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.
sbc100
left a comment
There was a problem hiding this comment.
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.
The usage of this function was removed in #1177.
The usage of this function was removed in #1177.
* 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 --buildalso when building on Windows. Historically we didn't usecmake --buildbecause it was unable to find where MSBuild.exe resided, but it looks like those problems are long gone.cmake --buildon 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.