feat(ci): upgrade python and remove LLVM LTO flags from MSVC build to fix Node 26 Windows CI#1330
Merged
Conversation
Copilot
AI
changed the title
feat: use python 3.14 in ci
fix: remove incompatible LLVM LTO flags from MSVC build to fix Node 26 Windows CI
Jun 5, 2026
creationix
approved these changes
Jun 5, 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.
Root Cause
Node.js 26 on Windows is compiled using Clang with thin LTO enabled (
enable_thin_lto=true,lto_jobs=2). Whennode-gyp rebuildruns without--nodedir, it generatesbuild/config.gypifrom the running Node.js binary'sprocess.config. This causes Node.js'scommon.gypito inject LLVM/Clang-specific flags into the MSVC build:-flto=thin→ compiler/linker warning (ignored by MSVC)/opt:lldltojobs=2→ fatal linker errorLNK1117(MSVC does not understand LLVM LTO job flags)Fix
Modified
test/binary/binding.gypto strip the incompatible LLVM LTO flags when building on Windows with MSVC:"lto_jobs%": ""default variable as a safe fallback for Node versions that do not define this variableconditionsblock using GYP'sAdditionalOptions!list-removal operator to remove-flto=thin,-flto=full, and/opt:lldltojobs=<(lto_jobs)from bothVCCLCompilerToolandVCLinkerTooloptionsThe fix is a no-op on Node 22/24 (LTO not enabled, no flags to remove) and does not affect Linux or macOS builds.