From 13abffc9a2c64a6f0f312634d821a73c215490f3 Mon Sep 17 00:00:00 2001 From: logbie Date: Mon, 17 Aug 2026 04:07:14 -0500 Subject: [PATCH] ci(nightly): drop the musl linker override so rustc keeps the link CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc hands the musl link to musl-gcc, a spec-file wrapper around the host gcc whose specs select musl's dynamic loader. Under it the build can silently emit a binary with a PT_INTERP segment while still going green, and -C target-feature=+crt-static cannot win the link back. That is exactly the condition #616 was closed to prevent. Rust's x86_64-unknown-linux-musl target ships its own self-contained musl libc and static-links by default, so removing the override moves the build toward rustc's default rather than away from it. CC_ stays: cc-rs genuinely needs it to compile aws-lc-sys for the musl target. The behaviour is currently benign on blacksmith-8vcpu-ubuntu-2404, so this is a latent dependency on an unpinned property of the runner image rather than a live breakage. The "Assert the binaries are statically linked" step (PT_INTERP absence, both binaries) remains the detector and is unchanged. Closes #683 --- .github/workflows/nightly.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 68fea4b7..c1c1d7f3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -465,8 +465,19 @@ jobs: timeout-minutes: 60 env: TARGET: x86_64-unknown-linux-musl + # cc-rs needs this so aws-lc-sys' C and assembly compile for the musl + # target. It is deliberately NOT paired with a matching + # CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER. That variable would hand + # the link to musl-gcc - a spec-file wrapper around the host gcc whose + # specs select musl's DYNAMIC loader - so the build silently emits a + # binary carrying a PT_INTERP segment, and `-C target-feature=+crt-static` + # cannot win the link back once musl-gcc is driving it. Rust's + # x86_64-unknown-linux-musl target ships its own self-contained musl and + # static-links by default, so the correct move is to leave the link to + # rustc rather than take it away. Dropping that override is wfl#683; the + # regression it prevents is wfl#616 reappearing. The `Assert the binaries + # are statically linked` step below is what proves this held. CC_x86_64_unknown_linux_musl: musl-gcc - CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: musl-gcc # Matches the BUILD_INFO the old wflbuild tarballs carried: no debug # symbols in the shipped artifact. Also keeps target/ far below the ~30 GB # ceiling CLAUDE.md warns about, so no disk-space dance is needed here.