feat(ci): upgrade python and remove LLVM LTO flags from MSVC build to fix Node 26 Windows CI by styfle · Pull Request #1330 · vercel/ncc (original) (raw)

Root Cause

Node.js 26 on Windows is compiled using Clang with thin LTO enabled (enable_thin_lto=true, lto_jobs=2). When node-gyp rebuild runs without --nodedir, it generates build/config.gypi from the running Node.js binary's process.config. This causes Node.js's common.gypi to inject LLVM/Clang-specific flags into the MSVC build:

Fix

Modified test/binary/binding.gyp to strip the incompatible LLVM LTO flags when building on Windows with MSVC:

The fix is a no-op on Node 22/24 (LTO not enabled, no flags to remove) and does not affect Linux or macOS builds.