fix(ci): set linker=platform-default for native cross-builds#260
Conversation
setup-soldr's `linker:` input defaults to `""` which auto-injects `fast`
(mold-or-rust-lld on Linux) via SOLDR_LINKER. That clobbers the
per-target linker that `cargo zigbuild` needs for the
aarch64-unknown-linux-musl cross-compile:
/usr/bin/ld: <sysroot>/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o:
error adding symbols: file in wrong format
clang: error: linker command failed with exit code 1
(clang fell back to host /usr/bin/ld instead of zig's cross-linker.)
The v2.2.4 release-auto run failed at the aarch64 musl native build for
this reason — see run 26341521326.
setup-soldr documents `linker: platform-default` as the explicit opt-out
that keeps whatever cargo config / rust-toolchain.toml specifies. Add it
to the native build template.
The fix applies only to template_native_build.yml (release native
binaries). All other workflows (check-*, fmt, msrv, docs, board builds,
bench-205, acceptance-205) continue to use the `fast` default — they're
host-native builds where it's a clear win.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 13 minutes and 12 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
The v2.2.4 release-auto run failed at the aarch64-unknown-linux-musl native build:
clang fell back to host
/usr/bin/ld(x86_64) instead of zig's cross-linker, so the aarch64 cross-objects couldn't be linked.Root cause
setup-soldr's
linker:input defaults to"", which auto-injectsfast(mold-or-rust-lld on Linux) viaSOLDR_LINKER. That clobbers the per-target linker thatcargo zigbuildrelies on for cross-compilation.setup-soldr documents
linker: platform-defaultas the explicit opt-out that keeps whatever cargo config / rust-toolchain.toml specifies.Fix
Set
linker: platform-defaultonly ontemplate_native_build.yml(release native binaries). All host-native build workflows (check-*, fmt, msrv, docs, board builds, bench-205, acceptance-205) continue to use thefastdefault — it's a clear win there.Test plan
release-auto.yml/build.ymlworkflow_call — won't run inline on PR)release-auto.ymlvia workflow_dispatch — no tag yet for v2.2.4, so prepare will fire the full build + publish + pypi pipeline🤖 Generated with Claude Code