Skip to content

Conversation

timothyg-stripe
Copy link
Contributor

This makes it possible to use the self-contained rust-lld linker through the gcc driver, which will be the default setup in Rust 1.90.0.

@timothyg-stripe
Copy link
Contributor Author

@UebelAndre is this something you can review?

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

This seems fine to me but how exactly does this ensure these targets will be used? Shouldn't this be something explicitly tracked by the toolchain and passed in Rustc actions?

@timothyg-stripe
Copy link
Contributor Author

@UebelAndre This PR doesn't ensure they'll be used, merely that it becomes possible to use them. It's still useful because folks who want to enable gcc-ld in their own setup can now do so with a configuration.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

--codegen=link-arg=-B$(RUST_SYSROOT)/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld

This is a bit cryptic but the change alone is fine. I still think this is something that should be made default and put behind an incompatibility flag. Thanks for including these files though!

@UebelAndre UebelAndre added this pull request to the merge queue Sep 11, 2025
Merged via the queue into bazelbuild:main with commit 76520e6 Sep 11, 2025
3 checks passed
@timothyg-stripe timothyg-stripe deleted the patch-1 branch September 12, 2025 02:20
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.

2 participants