aarch64 Linux builds link again: zig runs through a shim that drops -mfix-cortex-a53-843419 #147
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/aarch64-linux-zig-link"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The 0.5.0 release job (run 557) failed at
build-native --allwhile linkinglinux-arm64-gnu, so nothing reached npm. The cause is the pinned nightly (#124): it passes-mfix-cortex-a53-843419to the C compiler that linksaarch64-unknown-linux-gnu, andzig ccstops withUnknown Clang option. 0.4.0 was built with stable, which didn't pass the flag.-Z helpor-C help, and opting out of rust-lld (-Zunstable-options -Clinker-features=-lld -Clink-self-contained=-linker) still passes it.-Wl,--fix-cortex-a53-843419.scripts/zig-shim.shruns the real zig (SAFE_TS_ZIG, elsezigon PATH) and drops that one argument fromzig cc/zig c++.build-native.mjspoints cargo-zigbuild at the shim withCARGO_ZIGBUILD_ZIG_PATHfor the Linux and macOS targets. The binaries link the same way they did up to 0.4.0.No docs change: the README's build-native line is still accurate.
Test, locally with zig 0.14.1 and the pinned nightly, as in CI:
node scripts/build-native.mjsfor each platform.linux-arm64-gnu: failed with the CI error before this change; now produces an aarch64 ELF CLI and a.soaddon.darwin-arm64,darwin-x64,win32-x64-msvc: build. CI never reached these on the nightly.safe-ts.exe --versionruns on Windows.linux-x64-gnu: built again with the shim.🤖 Generated with Claude Code