Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustbuild: Remove one LLD workaround #76127

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,15 +1041,11 @@ impl<'a> Builder<'a> {
}
}

// FIXME: Don't use LLD with MSVC if we're compiling libtest, since it fails to link it.
// See https://github.com/rust-lang/rust/issues/68647.
let can_use_lld = mode != Mode::Std;

if let Some(host_linker) = self.linker(compiler.host, can_use_lld) {
if let Some(host_linker) = self.linker(compiler.host, true) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we always pass true now, could we drop that arg as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test suite is still run without explicit linker because there are tests that check linker search etc.
Perhaps we could switch to LLD there as well, but it may require adjusting some tests.
I'll try to do it in a separate PR.

cargo.env("RUSTC_HOST_LINKER", host_linker);
}

if let Some(target_linker) = self.linker(target, can_use_lld) {
if let Some(target_linker) = self.linker(target, true) {
let target = crate::envify(&target.triple);
cargo.env(&format!("CARGO_TARGET_{}_LINKER", target), target_linker);
}
Expand Down