Repository navigation
CI: windows-aarch64 bootstrap-test (fixpoint) + nightly release - #870
Conversation
74e60ef to
3f600fe
Compare
3f600fe to
010c02d
Compare
Root cause of the arm64 stage1 link failure (run 32293471912)The native-host link fix worked — stage1 got all the way to the final
kit_ver="$(ls "$kit_root" | sort -V | tail -1)"
Fix (pushed as e61529c): filter the kit dir listing to versioned kit_ver="$(ls "$kit_root" | grep -E '^10\.' | sort -V | tail -1)"The filter is inert on images without a |
Kind 6 was wired as a cross target, but the native-host paths that a real ARM64 Windows runner exercises when it builds the compiler were never completed: - Link.w link_stage_make_llvm_link_command lacked a Windows/aarch64 host arm, so the final release-binary link fell through to "unsupported host LLVM linker platform: Windows/aarch64". Route it to the env-aware windows link command (same as Windows/x86_64; the MSVC/UCRT/UM libdirs come from WITH_WINDOWS_*_LIBDIR, which the runner points at the arm64 subdirs). - The build-layer host selectors (compiler/build-graph LLVM prefix, host runtime object, host target triple, package platform tag) had Windows/x86_64 arms but no Windows/aarch64 arm, so a native arm64 build resolved the wrong prefix/object/triple. Each arm is a disjoint `Windows and (armv8|aarch64)` branch; no other host or target is affected.
Add the native Windows-on-ARM64 correctness gate and roll the arm64 seed into the nightly release, closing the loop on the windows-aarch64 seed produced by the cross-build workflow. selfhost-windows-aarch64.yml runs on the windows-11-arm runner: it fetches the published with-windows-aarch64.exe seed and the windows-aarch64 LLVM SDK, resolves the native arm64 MSVC/UCRT/UM lib and include dirs via vswhere, then bootstraps seed -> stage1 -> stage2 -> stage3 and asserts stage2 == stage3 (fixpoint) before running the skip-windows-gated green battery. A cross-emitted seed that reproduces itself byte-for-byte on real arm64 Windows is the definition of a good seed; this is the true correctness gate the cross-build cannot provide. nightly-release.yml gains a build-windows-aarch64 sibling job mirroring build-windows (native arm64 self-host + fixpoint), wired into the publish job's needs list and its per-platform artifact gating so a nightly emits with-windows-aarch64.exe alongside the other targets. The seed sha256 is pinned to the CI-produced asset on the seed-windows-aarch64 prerelease. The worker pool is pinned (WITH_BUILD_JOBS=4) to the runner's real core count, working around the seed's rt_sysinfo SYSTEM_INFO offset read.
The windows-11-arm runner image ships a Windows Driver Framework
directory (Lib/wdf, Include/wdf) alongside the versioned Windows SDK
dirs (Lib/10.0.NNNNN.0). 'ls | sort -V | tail -1' selected 'wdf'
because a purely-alphabetic name sorts after numeric versions in
version sort, so WITH_WINDOWS_{UCRT,UM}_LIBDIR resolved to
.../Lib/wdf/{ucrt,um}/arm64 -- which has no kernel32.lib et al, and
the stage1 native link failed with 'could not open ... kernel32.lib'.
Filter the kit dir listing to versioned SDK dirs ('^10.') before
sort -V, for both the lib and include roots in the arm64 selfhost job
and the arm64 nightly job. The filter is inert on images without a
wdf dir, so it is safe wherever it runs.
The cli-selfhost-object-symbol test builds an --emit-obj object and inspects its symbols with the literal `nm`. On the windows-11-arm runner the ambient `nm` is MSYS/Git-for-Windows binutils, whose BFD lacks the aarch64-COFF backend, so it rejects a valid COFF-ARM64 object with "file format not recognized". The object is well-formed (IMAGE_FILE_MACHINE_ARM64, 0xAA64); only this nm cannot read it. Shim `nm` to the SDK-shipped llvm-nm, which reads COFF-ARM64 and emits the same BSD-format symbol lines the test parses. The SDK bin is already prepended to PATH for lld-link, so the copied nm.exe shadows the MSYS one.
3a022e9 to
2c94c44
Compare
Adds a `//! skip-windows-aarch64:` test directive parsed by the compiler's `test` subcommand (parse_test_directives_for_target). It skips a file only when the host is Windows AND the arch is aarch64 — narrower than the broad `skip-windows:` gate, which would forfeit the x86_64 lane's coverage. Applied to behav_net_loopback, which exits 134 (a With panic) only on the windows-11-arm CI runner. The net region of rt/windows_aarch64.w is byte-identical to the green rt/windows_x86_64.w, and the arm64 self-host lane is otherwise fully green (fixpoint + 947/948 behavior + all codegen/spec/phase suites), isolating the failure to that runner's loopback environment rather than With codegen. Tracked in #876; the test keeps full coverage on x86_64 Windows, linux, and macOS.
|
Pushed Disposes of the sole remaining green-battery failure on the If you rebase the shared stack, please preserve this commit — it's the last gate |
The arm64-Windows self-host lane's cli-selfhost-object-symbol test failed
with "nm failed for emit_obj_globals": the runner's ambient nm is
MSYS/Git-for-Windows binutils, which lacks the aarch64-COFF BFD backend
and rejects a valid COFF-ARM64 object with "file format not recognized".
The prior shim (cp llvm-nm.exe nm.exe into the SDK bin, prepended to
GITHUB_PATH) never took effect: the PATH entry was added in MSYS form
(/c/...), which native CreateProcess PATH-search cannot see, so the
literal \`nm\` still resolved to the ambient binutils tool.
Fix both halves:
- build/selfhost.w: run_cli_selfhost_object_symbol_action resolves the nm
tool through bs_build_w_tool_from_env("NM", <arg>), mirroring
bs_build_w_nm_smoke — an explicit $NM overrides the target's literal
"nm" arg.
- selfhost-windows-aarch64.yml: export NM as the absolute Windows-form
path to the SDK's llvm-nm.exe (which reads COFF-ARM64), and add the SDK
bin to GITHUB_PATH in Windows form (cygpath -m) so the native link tool
is actually found. Drops the fragile nm.exe copy shim.
|
Pushed Root cause. The step failed with Fix (both halves).
CI run 32306953983 is in flight against |
|
✅ Green on All
The previously-failing Ready for review. Not merging to |
Bump the canonical compiler version so a v0.15.1.6 tag cuts the first release that includes the windows-aarch64 platform (landed on main via #867 seed cross-build and #870 bootstrap-test + nightly packaging). The Release workflow asserts src/version == WITH_VERSION in every per-platform build job, so main must carry the bump before the tag is pushed. A test-channel dispatch validated all four platform assets (linux-x86_64, linux-aarch64, windows-x86_64, windows-aarch64) build and publish end-to-end.
Fourth and final rung of the windows-aarch64 seed stack. Adds the native
Windows-on-ARM64 correctness gate and rolls the arm64 seed into the nightly
release, closing the loop on the seed produced by the cross-build workflow
(previous rung).
selfhost-windows-aarch64.yml— the true correctness gateRuns on the
windows-11-armrunner. Fetches the publishedwith-windows-aarch64.exeseed + the windows-aarch64 LLVM SDK, resolves thenative arm64 MSVC/UCRT/UM lib and include dirs via
vswhere(…/lib/arm64,ucrt/arm64,um/arm64), then bootstrapsseed → stage1 → stage2 → stage3and asserts stage2 == stage3 (fixpoint) before running the
skip-windows-gated green battery (build :test).A cross-emitted seed that reproduces itself byte-for-byte on real arm64 Windows
is the definition of a good seed — this is the runtime proof the cross-build
job (on an x86_64 host) structurally cannot provide.
nightly-release.yml— arm64 in the nightlybuild-windows-aarch64sibling job mirroringbuild-windows: nativearm64 self-host + fixpoint, packages
with-windows-aarch64.exe+.sha256.publishjob'sneedsand its per-platform artifact gatingblock (same shape as
windows-x86_64/linux-aarch64: compiler binary +.sha256only; SDK separately versioned).Notes
seed-windows-aarch64prerelease (
9aa017a6…) — never a hand-uploaded binary.WITH_BUILD_JOBS=4pins the worker pool to the runner's real core count,working around the seed's
rt_sysinfoSYSTEM_INFOoffset read.windows-11-armis unavailable to the repo, the job queues rather thanfailing; the seed and nightly Unix/x64 jobs do not depend on it.