diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2023-09-20 20:25:17 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2023-10-08 21:57:39 +0000 |
| commit | 5b9aa26401f13e9023bcc0e480694462f4cf031f (patch) | |
| tree | 64a9b9dc35c7453745637da30b3bbfd61e9eb440 /compiler/rustc_codegen_ssa/src/back | |
| parent | 2ce46f8e8c2efd76973bfa3a068cf67b7b525d48 (diff) | |
| download | rust-5b9aa26401f13e9023bcc0e480694462f4cf031f.tar.gz rust-5b9aa26401f13e9023bcc0e480694462f4cf031f.zip | |
implement opt out `-Clink-self-contained=-linker`
record both enabled and disabled components so that they can be merged with the ones that the target spec will define
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 464424409c7..28a51711b93 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -2978,8 +2978,9 @@ fn add_lld_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) { } // 1. Implement the "self-contained" part of this feature by adding rustc distribution - // directories to the tool's search path. - if sess.opts.cg.link_self_contained.linker() { + // directories to the tool's search path: + // - if the self-contained linker is enabled on the CLI. + if sess.opts.cg.link_self_contained.is_linker_enabled() { for path in sess.get_tools_search_paths(false) { cmd.arg({ let mut arg = OsString::from("-B"); @@ -2990,7 +2991,7 @@ fn add_lld_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) { } // 2. Implement the "linker flavor" part of this feature by asking `cc` to use some kind of - // `lld` as the linker. + // `lld` as the linker. cmd.arg("-fuse-ld=lld"); if !flavor.is_gnu() { |
