Skip to content

cross windows link: use the target SDK from llvm_ld.rsp - #2470

Merged
ehartford merged 1 commit into
mainfrom
seed-winarm-sdk-dir
Oct 19, 2026
Merged

ehartford merged 1 commit into
mainfrom
seed-winarm-sdk-dir

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Seed cross run 39212329480 failed at the final windows-aarch64 compiler link:

error: the LLVM SDK at /home/runner/work/with/with/.deps/llvm-22.1.6-linux-x86_64 carries no Windows C runtime (.../libc/windows/aarch64-w64-mingw32/lib/crt2.o)

Root cause: link_stage_make_windows_llvm_link_command derived the SDK from the host lld-link path. A cross compiler link runs the host linker over the target SDK's archives, so its C runtime and compiler-rt builtins must come from the SDK named by llvm_ld.rsp, not the host SDK. A compiler link now reads that SDK from the rsp's libclang archive. The cross Windows metadata generators also record a windows-gnu SDK's libc++.a/libunwind.a, as the native metadata generator does; a Visual Studio-built SDK is unchanged.

Evidence at the iterate tier:

  • new test/internals/link_windows_cross_sdk_test.w fails before the fix with the run's exact missing-crt2.o diagnostic and passes after;
  • with check src/main.w, with build :dev, ceremony census diff: green;
  • build.w and lib/std/build.w check under the pinned seed, the installed compiler, and the fresh release compiler;
  • seed-driven :gate green (run with the build store disabled after it restored installed-generation bootstrap objects into the seed gate; the gate itself completed all fixed targets).

Battery evidence will be posted on this PR before it is marked ready. After merge: re-dispatch the windows-aarch64 seed cross with the new source_ref; on green, bump the seed pins and re-run the native lane. #2305 stays open until that lane is green.

Seed cross run 39212329480 failed at the final compiler link because Link.w derived the Windows SDK from the host lld-link path and looked for the aarch64 C runtime in the Linux host SDK. A compiler link now takes its SDK from the libclang archive its llvm_ld.rsp names, so the C runtime and compiler-rt builtins come from the target SDK whose archives are being linked. The cross Windows metadata also records a windows-gnu SDK's libc++/libunwind, as the native metadata does.

New internals fixture link_windows_cross_sdk_test.w fails before the fix with the run's exact missing-crt2.o diagnostic and passes after. Gate green under the pinned seed.
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN on 29d57a8.

  • out/battery/status.txt: battery rc=0 wall=306s, GREEN, BATTERY_DONE.
  • UAT: 13 scenarios, 10 pass, 3 skip (display/platform skips only).
  • Battery checks survey: all targets green; tools-tests 282.7s, test-green and last-green recorded.
  • Seed-driven :gate was green before the battery after staging the new fixture (unit-return-review: ok).

Marking ready and merging; the windows-aarch64 seed cross will be re-dispatched from the merged source_ref next.

@ehartford
ehartford marked this pull request as ready for review October 19, 2026 08:02
@ehartford
ehartford merged commit 5adf36f into main Oct 19, 2026
@ehartford
ehartford deleted the seed-winarm-sdk-dir branch October 19, 2026 08:02
ehartford added a commit that referenced this pull request Oct 19, 2026
Seed cross run 39288117180 is green from main 35afb3a (#2470/#2471) against the windows-gnu SDK f137ee12. It published with-windows-aarch64.exe sha256 f27e7459c0039682e6b228e60abfbbcc750eb2a1dd61531269f08cb65380c967 to the seed-windows-aarch64 prerelease; the same bytes are promoted to the pinned nightly-20261015-local-1-efcb91c30a6a release the lanes fetch from. seed.lock and the three workflow pins (via tools/bump_seed_pins.w) now name that digest. The native windows-aarch64 lane verifies it next; #2305 closes only on that green.

Co-authored-by: Eric Hartford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant