Skip to content

Commit bad6b7b

Browse files
authored
Rollup merge of #139378 - Kobzol:bootstrap-use-lld-fix, r=petrochenkov
Use target-agnostic LLD flags in bootstrap for `use-lld` [Before](#135001), I hardcoded LLD flags that pretty much only worked on GNU. The right way is to use `-Zlinker-features` instead though. I *think* that this should also make this work on Windows mingw, and thus `@petrochenkov's` workaround is no longer necessary. Fixes: #139372 Closes: #139375 r? `@lqd`
2 parents f074bbf + 76e1302 commit bad6b7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/src/utils/helpers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,13 @@ pub fn linker_flags(
474474
if stage == 0 && target.is_windows() {
475475
args.push("-Clink-arg=-fuse-ld=lld".to_string());
476476
} else {
477-
args.push("-Clinker-flavor=gnu-lld-cc".to_string());
477+
args.push("-Zlinker-features=+lld".to_string());
478478
}
479479
// FIXME(kobzol): remove this flag once MCP510 gets stabilized
480480
args.push("-Zunstable-options".to_string());
481481
}
482482
LldMode::SelfContained => {
483-
args.push("-Clinker-flavor=gnu-lld-cc".to_string());
483+
args.push("-Zlinker-features=+lld".to_string());
484484
args.push("-Clink-self-contained=+linker".to_string());
485485
// FIXME(kobzol): remove this flag once MCP510 gets stabilized
486486
args.push("-Zunstable-options".to_string());

0 commit comments

Comments
 (0)