Skip to content

Only print the linker command when linking fails - #179

Merged
rvandermeulen merged 1 commit into
mozilla:masterfrom
rvandermeulen:linker-quiet
Nov 18, 2026
Merged

rvandermeulen merged 1 commit into
mozilla:masterfrom
rvandermeulen:linker-quiet

Conversation

@rvandermeulen

Copy link
Copy Markdown
Collaborator

Since Rust 1.97, rustc shows a linker's output as a linker_messages warning even when the link succeeds. The linker wrapper printed the full link command on every call, so every successful build now ends with a very long warning for each target. The wrapper now runs the linker first and prints the command only when the exit code is non-zero, which is what the comment above it already said it did.

Fixes #174.

Since Rust 1.97, rustc shows a linker's output on a successful link as a linker_messages warning, so printing
the command on every link turned each build into a wall of warnings. Fixes mozilla#174.

@segunfamisa segunfamisa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense to me. Thank you.

@rvandermeulen
rvandermeulen merged commit ac5cfff into mozilla:master Nov 18, 2026
13 checks passed
@rvandermeulen
rvandermeulen deleted the linker-quiet branch November 18, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust 1.97.0+ no longer suppresses linker output, causing noisy build logs

2 participants