Repository navigation
build(cmake): adapt import std wiring to the CMake 4.5 model, unpin CI CMake - #1867
Merged
Merged
Conversation
…I CMake CMake 4.5 graduated import std: no UUID gate, CMAKE_CXX_MODULE_STD is inert, CMAKE_CXX_COMPILER_IMPORT_STD is gone. enable_import_std.cmake now returns early on >= 4.5 (native model); the 3.30-4.4 experimental UUID path and its FATAL_ERROR hardening are unchanged. The root CMakeLists CXX26 dialect arm no longer decides levels from the removed variable. All four #1855 CMake 4.4.5 pin steps (build-winuxcmd, benchmark-speed-matrix, gnu-master-differential x2) and the dead -DCMAKE_CXX_MODULE_STD / -DCMAKE_EXPERIMENTAL_CXX_MODULE_STD flags are removed; CI now uses the windows-2025 image's CMake 4.5. Refs #1865
Trial unpin (run 45226913688) proved the wiring adaptation correct and the blocker upstream: on the image's CMake 4.5.0 the configure took the native path and generated the full graph, but the synthesized std targets carry only BMI edges -- the std.compat.ixx.obj compile edge is missing while link lines still reference it, reproducing the #1855 LNK1181 signature verbatim on all four legs. That edge is synthesized by CMake from the MSVC modules metadata; the repo wiring no longer participates. Restore the pins (reason updated in build-winuxcmd.yml) until a CMake/MSVC roll fixes the graph. The dead -D flags restored with them keep the pinned combination byte-identical to the proven green main; their removal rides with the eventual unpin. Refs #1865
This was referenced Nov 23, 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.
Refs #1865 — UNVERIFIED-BY-CAPTAIN
Outcome up front: the wiring is adapted to the CMake 4.5 model, but the unpin is blocked upstream and the 4.4.5 pins stay. A trial unpin on this branch (run 45226913688) proved both halves: the configure took the new native path on the image's CMake 4.5.0 and generated the full graph — and all four legs still died with the #1855 LNK1181 signature, because CMake 4.5.0's synthesized std targets on this image (MSVC 14.52) carry only BMI edges: the
std.compat.ixx.objcompile edge is missing (6 BMI edges, 0 obj edges in the log) while link lines still reference it. That edge is synthesized by CMake from the MSVC modules metadata; with the wiring on the documented 4.5 model, the repo no longer participates in it. This is root cause #2 from the #1855 diagnosis, now confirmed independently of the wiring. The pins were therefore restored (second commit); their comment in build-winuxcmd.yml now states the new reason and the removal test (a trial unpin with all four legs green after a CMake/MSVC roll).What this PR changes (final state vs main: 3 files, +39/−10)
cmake/enable_import_std.cmake(+15/−0): on CMake >= 4.5 the script states the native model and returns — no UUID gate, noCMAKE_CXX_MODULE_STD(inert in 4.5), no levels variable. The 3.30–4.4 path is byte-unchanged, including the build: pin CMake 4.4.5 in build-windows CI + FATAL_ERROR on unknown import-std CMake version #1855 FATAL_ERROR for an unknown version on that line. Under the restored pin (4.4.5) the new branch never executes; it activates for local >= 4.5 configures and for the eventual unpin.CMakeLists.txt(+13/−3): the CXX26 dialect arm no longer decides levels fromCMAKE_CXX_COMPILER_IMPORT_STDon CMake >= 4.5 (undefined there by design); it deliberately keeps the proven canary outcome until the CXX26 dialect is graduated separately..github/workflows/build-winuxcmd.yml(comment only): the pin step is byte-identical to main; its comment now records why the pin remains and how to remove it. The other three pin steps and all configure flags are byte-identical to main — the dead-Dcleanup from the trial commit was restored with the pins so the pinned combination stays exactly the proven-green one; flag cleanup rides with the eventual unpin.What this PR deletes
-Dflags — they leave with the unpin, once the upstream graph defect is fixed.)Net lines: +39 / −10. No product source, no user-visible text (no i18n surface).
Evidence
CMAKE_CXX_MODULE_STD"no longer has any effect" in 4.5,import std;is automatic with CXX_SCAN_FOR_MODULES;CMAKE_CXX_COMPILER_IMPORT_STDreporting removed in 4.5; 4.5 release notes: import std available for all C++20+ code with scanning enabled.std.compat.ixx.obj; graph forensics: BMI edges present, obj edges zero — the diagnosis §1 shape, reproduced under correct 4.5 wiring.What remains for #1865 after this PR
The unpin itself, gated on an upstream fix (a CMake and/or MSVC roll whose generated graph contains the std obj edge). When that lands: delete the four pin steps + the dead
-Dflags (the trial commit 9e16ca0 on this branch is exactly that change, ready to re-apply) and re-run the four legs. An upstream bug report (CMake issue tracker, with the 45226913688 graph evidence) is the other open follow-up.