build(llvm-win32): support CMAKE_GENERATOR and newer Visual Studio releases in build.mjs - #327
Open
euxaristia wants to merge 2 commits into
Open
euxaristia wants to merge 2 commits into
euxaristia wants to merge 2 commits into
Conversation
Contributor
|
@euxaristia is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
…leases `packages/llvm-win32-x64-msvc/scripts/build.mjs` previously hardcoded `-G "Visual Studio 17 2022"`, failing on systems with Visual Studio 18 2026 or where a custom generator was configured. Respect `process.env.CMAKE_GENERATOR` if defined, or probe `vswhere.exe` for installed Visual Studio major versions (18/17/16), only passing `-A x64` for Visual Studio generators. Fixes vercel-labs#326
euxaristia
force-pushed
the
fix/llvm-win32-cmake-generator
branch
from
September 17, 2026 13:33
b452a9d to
0748462
Compare
Pass -DCMAKE_BUILD_TYPE=Release when configuring with single-config generators such as Ninja, and probe candidate output directories before copying scriptc-llvm-codegen.exe to prevent ENOENT. Refs vercel-labs#326
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.
Summary
Resolves #326 by allowing
packages/llvm-win32-x64-msvc/scripts/build.mjsto work on systems with Visual Studio 18 2026 or custom CMake generators, rather than failing on hardcodedVisual Studio 17 2022.Changes
process.env.CMAKE_GENERATORwhen set.vswhere.exefor installed Visual Studio major versions (18, 17, 16) as automatic fallback.-A x64when using a Visual Studio generator.Test plan
packages/llvm-win32-x64-msvc/scripts/build.mjsconfigures with Visual Studio 18 2026 and compilesscriptc-llvm-codegen.exevia MSBuild.