about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2023-10-18 13:15:20 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2023-10-18 13:38:17 +0000
commite569a3691a80e597b382ec6773e4d227402fcc3a (patch)
tree4c8c612813b74c8f8d5b3042bc0124783f600487 /compiler/rustc_codegen_ssa/src/back
parentb816207e0562a1e9fb6e6e7b93b2fcc3e3c324f7 (diff)
downloadrust-e569a3691a80e597b382ec6773e4d227402fcc3a.tar.gz
rust-e569a3691a80e597b382ec6773e4d227402fcc3a.zip
unify `LinkSelfContained` and `LinkSelfContainedDefault`
Removes the backwards-compatible `LinkSelfContainedDefault`, by
incorporating the remaining specifics into `LinkSelfContained`.

Then renames the modern options to keep the old name.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index fb79df4f791..104f30697bd 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -23,7 +23,7 @@ use rustc_session::utils::NativeLibKind;
 use rustc_session::{filesearch, Session};
 use rustc_span::symbol::Symbol;
 use rustc_target::spec::crt_objects::CrtObjects;
-use rustc_target::spec::LinkSelfContained;
+use rustc_target::spec::LinkSelfContainedDefault;
 use rustc_target::spec::{Cc, LinkOutputKind, LinkerFlavor, Lld, PanicStrategy};
 use rustc_target::spec::{RelocModel, RelroLevel, SanitizerSet, SplitDebuginfo};
 
@@ -1714,9 +1714,9 @@ fn self_contained(sess: &Session, crate_type: CrateType) -> bool {
     }
 
     match sess.target.link_self_contained {
-        LinkSelfContained::True => true,
-        LinkSelfContained::False => false,
-        LinkSelfContained::WithComponents(components) => {
+        LinkSelfContainedDefault::False => false,
+        LinkSelfContainedDefault::True => true,
+        LinkSelfContainedDefault::WithComponents(components) => {
             if components.is_all() {
                 true
             } else if components.is_empty() {
@@ -1733,8 +1733,8 @@ fn self_contained(sess: &Session, crate_type: CrateType) -> bool {
         // FIXME: Find a better heuristic for "native musl toolchain is available",
         // based on host and linker path, for example.
         // (https://github.com/rust-lang/rust/pull/71769#issuecomment-626330237).
-        LinkSelfContained::InferredForMusl => sess.crt_static(Some(crate_type)),
-        LinkSelfContained::InferredForMingw => {
+        LinkSelfContainedDefault::InferredForMusl => sess.crt_static(Some(crate_type)),
+        LinkSelfContainedDefault::InferredForMingw => {
             sess.host == sess.target
                 && sess.target.vendor != "uwp"
                 && detect_self_contained_mingw(&sess)