-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Visual Studio 2022 #1177
Conversation
… when building on Windows. Leverage the VS2019 MSBuild 'Multi-ToolTask' feature CL_MPCount to saturate project builds properly to 100% CPU usage so building LLVM builds different cpp files in parallel. Clean up some code duplication around Visual Studio support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
In the long run, is there any reason not to simply require ninja for performing these builds?
If we embed Ninja precompiled into the repository, then maybe not. Though assuming upstream CMake fixes the CL_MPCount flags out of the box one day, doing |
Looks like the version of cmake we have on the bots doesn't support
|
I think maybe you need |
Huh, Linux test fails on the
When I run
According to https://github.com/Kitware/CMake/blob/master/Help/manual/cmake.1.rst I'll work around by passing the build specific |
Looks like the CI bots run ubuntu/bionic which has cmake 3.10.2.
We don't test building llvm from source in CI, only building binaryen, which I guess doesn't require such a new version of cmake. Leaving the |
Ohhh, that explains.. |
All the tests passed, but somehow the checks are all doubled, with a second copy waiting for status to be reported, and the first copy succeeding? I'll force-land this, looks like it's all green, but something might be sideways with the CI? |
* Add support for Visual Studio 2022 and migrate to using cmake --build when building on Windows. Leverage the VS2019 MSBuild 'Multi-ToolTask' feature CL_MPCount to saturate project builds properly to 100% CPU usage so building LLVM builds different cpp files in parallel. Clean up some code duplication around Visual Studio support. * flake * Work around Linux bot not having 'cmake --build . -j' flag.
This PR does the following:
cmake --build
also when building on Windows. Historically we didn't usecmake --build
because it was unable to find where MSBuild.exe resided, but it looks like those problems are long gone.cmake --build
on Windows, leverage the MSBuild 'Multi-ToolTask' feature CL_MPCount to saturate project builds properly to 100% CPU usage so building LLVM builds different cpp files in parallel.