Repository navigation
build scripts: take CMake and Ninja from the VS install that has them - #7346
Open
darthelmo1 wants to merge 1 commit into
Open
darthelmo1 wants to merge 1 commit into
darthelmo1 wants to merge 1 commit into
Conversation
build_runtime.ps1 and build_llvm_mc.ps1 looked for VS's bundled CMake and Ninja only in the newest Visual Studio with the C++ tools. With VS 2026 installed next to VS 2022, the newest one can lack the "C++ CMake tools" component the older one has. build_runtime.ps1 then fell back to calling cl.exe directly, without the GameInput shim and the rest of the CMake build, and warned that CMake and Ninja weren't found. Both scripts now take CMake and Ninja from the newest install that has the C++ tools and Microsoft.VisualStudio.Component.VC.CMake.Project. The compiler environment (vcvars64.bat) still comes from the newest install. With no install that has the component, nothing changes. Tested on Windows 11 with VS 2026 (C++ tools, no CMake component) and VS 2022 (both): build_runtime.ps1 now configures with VS 2022's CMake and Ninja and MSVC 19.52 from VS 2026, builds all 299 targets, and ctest passes 110 of 110 (the game- and Vulkan-gated ones skip). Before, the same machine took the cl.exe fallback. test_build_runtime_fallback (new case + new test), test_build_runtime_cmake, test_build_runtime_batch and the build_llvm_mc / llvm tests pass. test_build_batch_launch fails the same way on main without this change (ItsNotRexed#7120). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 10dc7da on the other common setup: VS 2026 Community alone, with the "C++ CMake tools" component (Windows 11 26200, MSVC 14.51), so the unchanged path. pass
I don't have VS 2022 installed beside 2026, so the split case in the description isn't reproduced here. AI-assisted: yes |
Contributor
|
Tested 10dc7da on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/build_runtime.ps1andscripts/build_llvm_mc.ps1look for VS's bundled CMake and Ninja only in the newest Visual Studio with the C++ tools (vswhere -latest). With VS 2026 installed next to VS 2022, the newest install can lack the "C++ CMake tools" component that the older one has.build_runtime.ps1then falls back to callingcl.exedirectly (no GameInput shim, no CMake-built tests or tools) and warns "CMake and Ninja weren't found", although both are installed.Both scripts now take CMake and Ninja from the newest install that has the C++ tools and
Microsoft.VisualStudio.Component.VC.CMake.Project. The compiler environment (vcvars64.bat) still comes from the newest install. With no install that has the component, nothing changes (the PATH fallback and thecl.exefallback work as before).Tested
Windows 11, VS 2026 Community (C++ tools, no CMake component) next to VS 2022 Community (both):
build_runtime.ps1cl.exefallback, warning abovectest --test-dir runtime/buildtests/test_build_runtime_fallback.py: OK, with a new lookup case (compiler install without CMake tools, another install with them) and a new test for the$cmakeVsquery.test_build_runtime_cmake,test_build_runtime_batch,test_build_llvm_mc_batch,test_build_llvm_mc_cleanup,test_llvm_install_*,test_llvm_source_version,test_mc_command: OK.test_build_batch_launchfails the same way onmainwithout this change (tests: update test_build_batch_launch for build_runtime.ps1 hidden launch #7120 updates it).No game files used.
🤖 Generated with Claude Code