Skip to content

Commit 1cb200c

Browse files
committed
Auto merge of #118810 - Kobzol:revert-mcp-510-bootstrap, r=nnethercote
Revert using MCP510 in bootstrap This reverts commit 40c3d35. The commit started dogfooding MCP510 to enable `lld` when building the compiler , but it broke tests, because we don't pass `-Zunstable-options` on enough places. This PR hotfixes that, and temporarily makes the "self-contained" option.. not very self-contained. I'll send a proper fix later, but I want to unblock rustc developres that use `lld` locally. r? `@nnethercote` (who discovered the problem)
2 parents a9cb8ee + 3157f21 commit 1cb200c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/bootstrap/src/utils/helpers.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ use std::sync::OnceLock;
1515
use std::time::{Instant, SystemTime, UNIX_EPOCH};
1616

1717
use crate::core::builder::Builder;
18-
use crate::core::config::{Config, LldMode, TargetSelection};
18+
use crate::core::config::{Config, TargetSelection};
19+
use crate::LldMode;
1920

2021
pub use crate::utils::dylib::{dylib_path, dylib_path_var};
2122

@@ -513,16 +514,7 @@ pub fn linker_flags(
513514
) -> Vec<String> {
514515
let mut args = vec![];
515516
if !builder.is_lld_direct_linker(target) && builder.config.lld_mode.is_used() {
516-
match builder.config.lld_mode {
517-
LldMode::External => {
518-
args.push("-Clinker-flavor=gnu-lld-cc".to_string());
519-
}
520-
LldMode::SelfContained => {
521-
args.push("-Clinker-flavor=gnu-lld-cc".to_string());
522-
args.push("-Clink-self-contained=+linker".to_string());
523-
}
524-
LldMode::Unused => {}
525-
}
517+
args.push(String::from("-Clink-arg=-fuse-ld=lld"));
526518

527519
if matches!(lld_threads, LldThreads::No) {
528520
args.push(format!(

0 commit comments

Comments
 (0)