rustc_target: Move target_vendor from Target to TargetOptions

This commit is contained in:
Vadim Petrochenkov 2020-10-08 22:10:13 +03:00
parent d5fd31197f
commit b294cc71a2
161 changed files with 28 additions and 163 deletions

View File

@ -19,7 +19,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
arch: arch.to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base },
}

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
features: "+neon,+fp-armv8,+apple-a7".to_string(),

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
features: "+neon,+fp-armv8,+apple-a7".to_string(),

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: String::new(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base },
}

View File

@ -14,7 +14,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base },
}

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "pc".to_string(),
linker_flavor: LinkerFlavor::Msvc,
options: base,
}

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base },
}

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: base,
}

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
unsupported_abis: super::arm_base::unsupported_abis(),

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
unsupported_abis: super::arm_base::unsupported_abis(),

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "__mcount".to_string(), ..base },
}

View File

@ -10,6 +10,7 @@
pub fn target() -> Target {
let opts = TargetOptions {
target_vendor: String::new(),
linker: Some("rust-lld".to_owned()),
features: "+strict-align,+neon,+fp-armv8".to_string(),
executables: true,
@ -24,7 +25,6 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".to_string(),
pointer_width: 64,
target_vendor: String::new(),
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -10,6 +10,7 @@
pub fn target() -> Target {
let opts = TargetOptions {
target_vendor: String::new(),
linker: Some("rust-lld".to_owned()),
features: "+strict-align,-neon,-fp-armv8".to_string(),
executables: true,
@ -24,7 +25,6 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".to_string(),
pointer_width: 64,
target_vendor: String::new(),
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "uwp".to_string(),
linker_flavor: LinkerFlavor::Msvc,
options: base,
}

View File

@ -9,7 +9,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
target_vendor: "wrs".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base },
}

View File

@ -18,6 +18,7 @@ pub fn opts(os: &str) -> TargetOptions {
TargetOptions {
target_os: os.to_string(),
target_vendor: "apple".to_string(),
// macOS has -dead_strip, which doesn't rely on function_sections
function_sections: false,
dynamic_linking: true,

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base },
}

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -15,7 +15,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
unsupported_abis: super::arm_base::unsupported_abis(),

View File

@ -15,7 +15,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
unsupported_abis: super::arm_base::unsupported_abis(),

View File

@ -9,11 +9,11 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: TargetOptions {
target_endian: "big".to_string(),
target_vendor: String::new(),
executables: true,
linker: Some("rust-lld".to_owned()),
relocation_model: RelocModel::Static,

View File

@ -9,11 +9,11 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: String::new(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: TargetOptions {
target_endian: "big".to_string(),
target_vendor: String::new(),
executables: true,
linker: Some("rust-lld".to_owned()),
relocation_model: RelocModel::Static,

View File

@ -7,7 +7,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -7,7 +7,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -7,7 +7,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".to_string(),
arch: "arm".to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
features: "+v7,+vfp3,+neon".to_string(),

View File

@ -19,7 +19,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base },
}

View File

@ -13,7 +13,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base },
}

View File

@ -7,7 +7,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -15,7 +15,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -12,7 +12,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
// Most of these settings are copied from the armv7_unknown_linux_gnueabihf

View File

@ -7,7 +7,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -7,7 +7,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "wrs".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
// Info about features at https://wiki.debian.org/ArmHardFloatPort

View File

@ -21,6 +21,7 @@
pub fn target() -> Target {
let opts = TargetOptions {
target_vendor: String::new(),
linker: Some("rust-lld".to_owned()),
features: "+v7,+thumb2,+soft-float,-neon,+strict-align".to_string(),
executables: true,
@ -35,7 +36,6 @@ pub fn target() -> Target {
Target {
llvm_target: "armv7a-none-eabi".to_string(),
pointer_width: 32,
target_vendor: String::new(),
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -9,6 +9,7 @@
pub fn target() -> Target {
let opts = TargetOptions {
target_vendor: String::new(),
linker: Some("rust-lld".to_owned()),
features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(),
executables: true,
@ -23,7 +24,6 @@ pub fn target() -> Target {
Target {
llvm_target: "armv7a-none-eabihf".to_string(),
pointer_width: 32,
target_vendor: String::new(),
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -9,10 +9,10 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: TargetOptions {
target_vendor: String::new(),
executables: true,
linker: Some("rust-lld".to_owned()),
relocation_model: RelocModel::Static,

View File

@ -9,10 +9,10 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_vendor: "".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: TargetOptions {
target_vendor: String::new(),
executables: true,
linker: Some("rust-lld".to_owned()),
relocation_model: RelocModel::Static,

View File

@ -8,7 +8,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".to_string(),
arch: "arm".to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
features: "+v7,+vfp4,+neon".to_string(),

View File

@ -10,7 +10,6 @@ pub fn target(target_cpu: String) -> Target {
llvm_target: "avr-unknown-unknown".to_string(),
pointer_width: 16,
linker_flavor: LinkerFlavor::Gcc,
target_vendor: "unknown".to_string(),
options: TargetOptions {
target_c_int_width: "16".to_string(),
target_os: "unknown".to_string(),

View File

@ -21,6 +21,7 @@ pub fn opts() -> TargetOptions {
TargetOptions {
target_os: "fuchsia".to_string(),
target_vendor: String::new(),
linker: Some("rust-lld".to_owned()),
lld_flavor: LldFlavor::Ld,
dynamic_linking: true,

View File

@ -28,7 +28,6 @@ pub fn target() -> Target {
)
.to_string(),
arch: "hexagon".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
f64:32:64-f80:128-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base },
}

View File

@ -22,7 +22,6 @@ pub fn target() -> Target {
f64:32:64-f80:128-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "apple".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base },
}

View File

@ -20,7 +20,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -23,7 +23,6 @@ pub fn target() -> Target {
i64:64-f80:32-n8:16:32-a:0:32-S32"
.to_string(),
arch: "x86".to_string(),
target_vendor: "pc".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -27,7 +27,6 @@ pub fn target() -> Target {
i64:64-f80:32-n8:16:32-a:0:32-S32"
.to_string(),
arch: "x86".to_string(),
target_vendor: "pc".to_string(),
linker_flavor: LinkerFlavor::Msvc,
options: base,
}

View File

@ -15,7 +15,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -16,7 +16,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -14,7 +14,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -14,7 +14,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -29,7 +29,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -14,7 +14,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "__mcount".to_string(), ..base },
}

View File

@ -15,7 +15,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -82,7 +82,6 @@ pub fn target() -> Target {
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i64:64-f80:32-n8:16:32-a:0:32-S32"
.to_string(),
target_vendor: "unknown".to_string(),
arch: "x86".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Link),

View File

@ -22,7 +22,6 @@ pub fn target() -> Target {
i64:64-f80:32-n8:16:32-a:0:32-S32"
.to_string(),
arch: "x86".to_string(),
target_vendor: "uwp".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -13,7 +13,6 @@ pub fn target() -> Target {
i64:64-f80:32-n8:16:32-a:0:32-S32"
.to_string(),
arch: "x86".to_string(),
target_vendor: "uwp".to_string(),
linker_flavor: LinkerFlavor::Msvc,
options: base,
}

View File

@ -14,7 +14,6 @@ pub fn target() -> Target {
f64:32:64-f80:32-n8:16:32-S128"
.to_string(),
arch: "x86".to_string(),
target_vendor: "wrs".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
}

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
arch: "mips64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
arch: "mips64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
arch: "mips64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
// NOTE(mips64r2) matches C toolchain

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
arch: "mips64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "_mcount".to_string(), ..base },
}

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -13,11 +13,11 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "sony".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
options: TargetOptions {
target_os: "psp".to_string(),
target_vendor: "sony".to_string(),
cpu: "mips2".to_string(),
executables: true,
linker: Some("rust-lld".to_owned()),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "_mcount".to_string(), ..base },
}

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
arch: "mips".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
arch: "mips64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
arch: "mips64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
// NOTE(mips64r6) matches C toolchain

View File

@ -668,8 +668,6 @@ pub struct Target {
pub llvm_target: String,
/// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable.
pub pointer_width: u32,
/// Vendor name to use for conditional compilation.
pub target_vendor: String,
/// Architecture to use for ABI considerations. Valid options include: "x86",
/// "x86_64", "arm", "aarch64", "mips", "powerpc", "powerpc64", and others.
pub arch: String,
@ -709,6 +707,8 @@ pub struct TargetOptions {
pub target_os: String,
/// Environment name to use for conditional compilation. Defaults to "".
pub target_env: String,
/// Vendor name to use for conditional compilation. Defaults to "unknown".
pub target_vendor: String,
/// Linker to invoke
pub linker: Option<String>,
@ -992,6 +992,7 @@ fn default() -> TargetOptions {
target_c_int_width: "32".to_string(),
target_os: "none".to_string(),
target_env: String::new(),
target_vendor: "unknown".to_string(),
linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()),
lld_flavor: LldFlavor::Ld,
pre_link_args: LinkArgs::new(),
@ -1153,13 +1154,6 @@ pub fn from_json(obj: Json) -> Result<Target, String> {
.ok_or_else(|| format!("Field {} in target specification is required", name))
};
let get_opt_field = |name: &str, default: &str| {
obj.find(name)
.and_then(|s| s.as_string())
.map(|s| s.to_string())
.unwrap_or_else(|| default.to_string())
};
let mut base = Target {
llvm_target: get_req_field("llvm-target")?,
pointer_width: get_req_field("target-pointer-width")?
@ -1167,7 +1161,6 @@ pub fn from_json(obj: Json) -> Result<Target, String> {
.map_err(|_| "target-pointer-width must be an integer".to_string())?,
data_layout: get_req_field("data-layout")?,
arch: get_req_field("arch")?,
target_vendor: get_opt_field("vendor", "unknown"),
linker_flavor: LinkerFlavor::from_str(&*get_req_field("linker-flavor")?)
.ok_or_else(|| format!("linker flavor must be {}", LinkerFlavor::one_of()))?,
options: Default::default(),
@ -1416,6 +1409,7 @@ macro_rules! key {
key!(target_c_int_width);
key!(target_os = "os");
key!(target_env = "env");
key!(target_vendor = "vendor");
key!(linker, optional);
key!(lld_flavor, LldFlavor)?;
key!(pre_link_objects, link_objects);
@ -1645,7 +1639,6 @@ macro_rules! target_option_val {
target_val!(llvm_target);
d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json());
target_val!(arch);
target_val!(target_vendor, "vendor");
target_val!(data_layout);
target_val!(linker_flavor);
@ -1654,6 +1647,7 @@ macro_rules! target_option_val {
target_option_val!(target_c_int_width);
target_option_val!(target_os, "os");
target_option_val!(target_env, "env");
target_option_val!(target_vendor, "vendor");
target_option_val!(linker);
target_option_val!(lld_flavor);
target_option_val!(pre_link_objects);

View File

@ -6,11 +6,11 @@ pub fn target() -> Target {
pointer_width: 16,
data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(),
arch: "msp430".to_string(),
target_vendor: String::new(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_c_int_width: "16".to_string(),
target_vendor: String::new(),
executables: true,
// The LLVM backend currently can't generate object files. To

View File

@ -7,14 +7,13 @@ pub fn target() -> Target {
data_layout: "e-i64:64-i128:128-v16:16-v32:32-n16:32:64".to_string(),
llvm_target: "nvptx64-nvidia-cuda".to_string(),
target_vendor: "nvidia".to_string(),
linker_flavor: LinkerFlavor::PtxLinker,
pointer_width: 64,
options: TargetOptions {
target_os: "cuda".to_string(),
target_vendor: "nvidia".to_string(),
// The linker can be installed from `crates.io`.
linker: Some("rust-ptx-linker".to_string()),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -15,7 +15,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "E-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
target_vendor: "wrs".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_endian: "big".to_string(), ..base },
}

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "_mcount".to_string(), ..base },
}

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions { target_mcount: "_mcount".to_string(), ..base },
}

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -10,7 +10,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
target_vendor: "wrs".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -11,7 +11,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
target_vendor: "wrs".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
target_endian: "big".to_string(),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 32,
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
arch: "riscv32".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
unsupported_abis: super::riscv_base::unsupported_abis(),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
llvm_target: "riscv32".to_string(),
pointer_width: 32,
target_vendor: "unknown".to_string(),
arch: "riscv32".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
llvm_target: "riscv32".to_string(),
pointer_width: 32,
target_vendor: "unknown".to_string(),
arch: "riscv32".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
llvm_target: "riscv32".to_string(),
pointer_width: 32,
target_vendor: "unknown".to_string(),
arch: "riscv32".to_string(),
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),

View File

@ -6,7 +6,6 @@ pub fn target() -> Target {
pointer_width: 64,
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(),
arch: "riscv64".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: TargetOptions {
unsupported_abis: super::riscv_base::unsupported_abis(),

Some files were not shown because too many files have changed in this diff Show More