diff --git a/compiler/rustc_target/src/spec/base/android.rs b/compiler/rustc_target/src/spec/base/android.rs index 5320f1b4bbbea..bb491f3c067ef 100644 --- a/compiler/rustc_target/src/spec/base/android.rs +++ b/compiler/rustc_target/src/spec/base/android.rs @@ -1,8 +1,12 @@ use crate::spec::{base, SanitizerSet, TargetOptions, TlsModel}; +use crate::spec::cvs; + pub fn opts() -> TargetOptions { let mut base = base::linux::opts(); base.os = "android".into(); + // listing families in different orders seems most chaotic. :^) + base.families = cvs!["unix, linux"]; base.is_like_android = true; base.default_dwarf_version = 2; base.tls_model = TlsModel::Emulated; diff --git a/compiler/rustc_target/src/spec/base/apple/mod.rs b/compiler/rustc_target/src/spec/base/apple/mod.rs index d667bad44e3b7..8eff7fcf74557 100644 --- a/compiler/rustc_target/src/spec/base/apple/mod.rs +++ b/compiler/rustc_target/src/spec/base/apple/mod.rs @@ -150,7 +150,7 @@ pub fn opts(os: &'static str, arch: Arch) -> TargetOptions { function_sections: false, dynamic_linking: true, pre_link_args: pre_link_args(os, arch, abi), - families: cvs!["unix"], + families: cvs!["apple", "unix"], is_like_osx: true, // LLVM notes that macOS 10.11+ and iOS 9+ default // to v4, so we do the same. diff --git a/compiler/rustc_target/src/spec/base/linux.rs b/compiler/rustc_target/src/spec/base/linux.rs index df8e848124a9b..4567a0be8942a 100644 --- a/compiler/rustc_target/src/spec/base/linux.rs +++ b/compiler/rustc_target/src/spec/base/linux.rs @@ -5,7 +5,7 @@ pub fn opts() -> TargetOptions { TargetOptions { os: "linux".into(), dynamic_linking: true, - families: cvs!["unix"], + families: cvs!["linux", "unix"], has_rpath: true, position_independent_executables: true, relro_level: RelroLevel::Full,