Skip to content

Commit 99c1bcf

Browse files
committed
Revert "make MCP510 behavior explicitly opt-in"
This reverts commit 2b61a5e.
1 parent abc910b commit 99c1bcf

File tree

1 file changed

+2
-17
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+2
-17
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+2-17
Original file line numberDiff line numberDiff line change
@@ -2991,25 +2991,10 @@ fn add_lld_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) {
29912991
return;
29922992
}
29932993

2994-
let self_contained_linker = sess.opts.cg.link_self_contained.linker();
2995-
2996-
// FIXME: some targets default to using `lld`, but users can only override the linker on the CLI
2997-
// and cannot yet select the precise linker flavor to opt out of that. See for example issue
2998-
// #113597 for the `thumbv6m-none-eabi` target: a driver is used, and its default linker
2999-
// conflicts with the target's flavor, causing unexpected arguments being passed.
3000-
//
3001-
// Until the new `LinkerFlavor`-like CLI options are stabilized, we only adopt MCP510's behavior
3002-
// if its dedicated unstable CLI flags are used, to keep the current sub-optimal stable
3003-
// behavior.
3004-
let using_mcp510 =
3005-
self_contained_linker || sess.opts.cg.linker_flavor.is_some_and(|f| f.is_unstable());
3006-
if !using_mcp510 && !unstable_use_lld {
3007-
return;
3008-
}
3009-
30102994
// 1. Implement the "self-contained" part of this feature by adding rustc distribution
30112995
// directories to the tool's search path.
3012-
if self_contained_linker || unstable_use_lld {
2996+
let self_contained_linker = sess.opts.cg.link_self_contained.linker() || unstable_use_lld;
2997+
if self_contained_linker {
30132998
for path in sess.get_tools_search_paths(false) {
30142999
cmd.arg({
30153000
let mut arg = OsString::from("-B");

0 commit comments

Comments
 (0)