Quiet the cosmetic zig linker_messages warning on the musl build
The musl release build now links cleanly through cargo-zigbuild, but rustc's new linker_messages lint echoed zig's "ignoring deprecated linker optimization setting '1'" note — zig's linker declining the -O1 GNU-ld flag Rust passes. It is cosmetic and the binary is correct, so allow that one lint, scoped to the zig build step only. macOS and Windows keep full linker diagnostics, and a real link error still fails the build. No behaviour change to the produced binaries; takes effect on the next tag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
6438982d45
commit
2196f6635b
1 file changed
+6
@@ -88,6 +88,12 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ "${{ matrix.zig }}" == "true" ]]; then
|
||||
# zig's linker ignores the `-O1` GNU-ld optimization flag Rust passes
|
||||
# and says so on stderr, which rustc now surfaces as a linker_messages
|
||||
# warning. It is cosmetic — the binary is correct — so quiet just that
|
||||
# one lint to keep the musl build log clean. A real link error still
|
||||
# fails the build.
|
||||
export RUSTFLAGS="${RUSTFLAGS:-} -A linker_messages"
|
||||
cargo zigbuild --release --locked --target "${{ matrix.target }}" --bin tsunagi
|
||||
else
|
||||
cargo build --release --locked --target "${{ matrix.target }}" --bin tsunagi
|
||||
|
||||
Reference in new issue
Block a user