Configure-time guard for known-bad Windows toolchains (#36) - #39
Merged
Merged
Conversation
Two combinations configured and built cleanly while being wrong; both were advisory prose until the test suite (21 s of segfaults) enforced one. - mingw GCC with any AVX2-or-wider target compiled in is now a FATAL_ERROR naming GCC PR 126741, with both escapes in the message: cap to the 128-bit tiers, or CORVUS_ALLOW_UNSUPPORTED_TOOLCHAIN=ON (warns). - Real MSVC is capped at AVX2 by corvus itself — (HWY_AVX3|(HWY_AVX3-1)) OR-ed into HWY_DISABLED_TARGETS — so a change to Highway's blocklist cannot silently widen an unvalidated build. Announced on every MSVC configure (WARNING top-level, NOTICE as a subproject); CORVUS_MSVC_UNBLOCK_AVX512 lifts both caps. - clang-cl and GNU-driver clang pass untouched: the guard keys on the compiler ID, never on CMake's MSVC/MINGW variables. The guard does not parse CORVUS_DISABLED_TARGETS. A two-sided compile probe asks Highway's own HWY_TARGETS whether a wide target survives the cap; it showed the hand-written "HWY_AVX3|HWY_AVX2" is not a 128-bit cap (AVX3_DL/ZEN4/SPR stay compiled) — the false-confidence case the issue warned about. The verdict is a pure function, tested in cmake -P on every leg (mutation-checked); the Windows job gains two configure-only mingw steps that reuse its Highway checkout. Verified locally by widening the system match to Darwin in a scratch copy and configuring with Homebrew g++-16: uncapped -> fatal, 128-bit cap -> OK, partial cap -> fatal, override -> warning. Closes #36 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n the Windows job comment The unquoted $(pkg-config ...) was intentional word splitting, flagged by shellcheck via actionlint. reviewdog reports per touched file, so the pre-existing warning surfaced on this PR. An explicit array keeps the behaviour and states the intent. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Closes #36.
cmake/ToolchainGuard.cmaketurns two advisory Windows hazards into configure-time behaviour.FATAL_ERRORnaming GCC PR 126741, both escapes in the messageCORVUS_ALLOW_UNSUPPORTED_TOOLCHAIN=ONWARNING(HWY_AVX3|(HWY_AVX3-1))OR-ed intoHWY_DISABLED_TARGETS), announced every configure:WARNINGtop-level,NOTICEas a subprojectCORVUS_MSVC_UNBLOCK_AVX512=ONGNU/MSVConlyNo string parsing. A two-sided compile probe asks Highway's own
HWY_TARGETSwhether a wide target survives the cap. It immediately showed that the hand-written"HWY_AVX3|HWY_AVX2"is not a 128-bit cap —AVX3_DL/AVX3_ZEN4/AVX3_SPRstay compiled — which is the false-confidence case the issue warned about. A broken probe reportsPROBE_FAILEDand is treated as uncapped, never as capped.Why the MSVC cap is explicit: today MSVC tops out at AVX2 only because Highway's
HWY_BROKEN_MSVCsays so. If upstream adds a version floor (#28), an MSVC build would silently start compiling AVX-512 kernels nobody validated. The notice is unconditional rather than host-CPU-dependent because the cap governs what is compiled, and the configure host is often not the run host.Verification
toolchain_guardctest: the verdict function incmake -Pscript mode, every leg, mutation-checked (breaking the Windows match fails 3 verdicts).CORVUS_EXPECT_TARGET=AVX2still holding.No GCC version condition yet — no fixed release exists; #29 is the trigger.
🤖 Generated with Claude Code