You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause is environmental, not a consumer-package bug:
The windows-2025 image now exposes a newer MSVC 14.51 toolset (VS18). The Swift/clang driver resolves the newest installed Visual Studio via vswhere, so it picks 14.51, whose STL (yvals_core.h) hard-asserts Clang 20 or newer.
Swift 6.1 and 6.2 bundle Clang 19 → assertion fires. Swift 6.3 bundles Clang 20 and is fine.
windows-2022 still defaults to an older 14.4x toolset compatible with Clang 19, so it builds all three.
Because the Windows build is delegated entirely to this action (gha-setup-swift + swift build), a consumer has no lever to work around it — the action exposes only windows-swift-version / windows-swift-build. There's no windows-swift-flags (unlike wasm-swift-flags / android-swift-build-flags) and no toolset selection, so neither of the two known mitigations can be applied through the action.
Impact
Every package using brightdigit/swift-build@v1 with a [windows-2022, windows-2025] × [6.1, 6.2, 6.3] matrix hits this identically. Today the only fix a consumer can apply is at the matrix level — dropping windows-2025 × {6.1, 6.2} (e.g. brightdigit/MistKit#418) — which loses windows-2025 coverage for those toolchains.
Requested: give consumers a workaround knob
Any one of these would unblock callers who want to keep windows-2025 coverage:
windows-swift-flags input (mirrors wasm-swift-flags / android-swift-build-flags) appended to the Windows swift build/swift test. Callers could then pass:
MSVC toolset pin input (e.g. windows-vc-toolset: "14.44"): before the build, activate VS2022's older 14.44 toolset (set INCLUDE/LIB/PATH/VCToolsInstallDir, or write Microsoft.VCToolsVersion.default.txt) so the Swift driver uses a Clang-19-compatible STL. 14.44 ships on the windows-2025 image (VS2022 17.14) alongside 14.51.
Auto-mitigation + docs: detect the Swift toolchain's bundled Clang major vs. the default MSVC STL's required Clang, and either auto-select a compatible installed toolset or emit a clear, documented error pointing at options 1/2. At minimum, document the matrix-exclude workaround.
Option 1 is the smallest change and matches the existing per-platform *-swift-flags pattern; option 2 keeps codegen/STL aligned but is more involved.
Problem
On the
windows-2025runner, building with Swift 6.1 or 6.2 fails inside swift-crypto'sCCryptoBoringSSL:Root cause is environmental, not a consumer-package bug:
windows-2025image now exposes a newer MSVC 14.51 toolset (VS18). The Swift/clang driver resolves the newest installed Visual Studio viavswhere, so it picks 14.51, whose STL (yvals_core.h) hard-assertsClang 20 or newer.windows-2022still defaults to an older 14.4x toolset compatible with Clang 19, so it builds all three.Because the Windows build is delegated entirely to this action (
gha-setup-swift+swift build), a consumer has no lever to work around it — the action exposes onlywindows-swift-version/windows-swift-build. There's nowindows-swift-flags(unlikewasm-swift-flags/android-swift-build-flags) and no toolset selection, so neither of the two known mitigations can be applied through the action.Impact
Every package using
brightdigit/swift-build@v1with a[windows-2022, windows-2025] × [6.1, 6.2, 6.3]matrix hits this identically. Today the only fix a consumer can apply is at the matrix level — droppingwindows-2025 × {6.1, 6.2}(e.g. brightdigit/MistKit#418) — which loses windows-2025 coverage for those toolchains.Requested: give consumers a workaround knob
Any one of these would unblock callers who want to keep windows-2025 coverage:
windows-swift-flagsinput (mirrorswasm-swift-flags/android-swift-build-flags) appended to the Windowsswift build/swift test. Callers could then pass:This silences the STL static_assert. Caveat: it pairs Clang 19 codegen with a 14.51 STL, so it's a bypass, not a true fix — see [Windows] Consider passing
-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCHto Clang by default swiftlang/swift#79709.MSVC toolset pin input (e.g.
windows-vc-toolset: "14.44"): before the build, activate VS2022's older 14.44 toolset (setINCLUDE/LIB/PATH/VCToolsInstallDir, or writeMicrosoft.VCToolsVersion.default.txt) so the Swift driver uses a Clang-19-compatible STL. 14.44 ships on the windows-2025 image (VS2022 17.14) alongside 14.51.Auto-mitigation + docs: detect the Swift toolchain's bundled Clang major vs. the default MSVC STL's required Clang, and either auto-select a compatible installed toolset or emit a clear, documented error pointing at options 1/2. At minimum, document the matrix-exclude workaround.
Option 1 is the smallest change and matches the existing per-platform
*-swift-flagspattern; option 2 keeps codegen/STL aligned but is more involved.References
-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCHto Clang by default swiftlang/swift#79709🤖 Generated with Claude Code