rustc_target: Move target env "gnu" from linux_base to linux_gnu_base

This commit is contained in:
Vadim Petrochenkov 2020-11-10 23:32:58 +03:00
parent 38030ffb4e
commit ca17a91fb7
32 changed files with 35 additions and 30 deletions

View File

@ -1,7 +1,7 @@
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.max_atomic_width = Some(128);
Target {

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, TargetOptions};
pub fn opts() -> TargetOptions {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.os = "android".to_string();
// Many of the symbols defined in compiler-rt are also defined in libgcc.
// Android's linker doesn't like that by default.

View File

@ -1,7 +1,7 @@
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.max_atomic_width = Some(64);
Target {
llvm_target: "arm-unknown-linux-gnueabi".to_string(),

View File

@ -1,7 +1,7 @@
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.max_atomic_width = Some(64);
Target {
llvm_target: "arm-unknown-linux-gnueabihf".to_string(),

View File

@ -1,7 +1,7 @@
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
let base = super::linux_base::opts();
let base = super::linux_gnu_base::opts();
Target {
llvm_target: "armv4t-unknown-linux-gnueabi".to_string(),
pointer_width: 32,

View File

@ -1,7 +1,7 @@
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
let base = super::linux_base::opts();
let base = super::linux_gnu_base::opts();
Target {
llvm_target: "armv5te-unknown-linux-gnueabi".to_string(),
pointer_width: 32,

View File

@ -4,7 +4,7 @@ use crate::spec::{Target, TargetOptions};
// hardfloat.
pub fn target() -> Target {
let base = super::linux_base::opts();
let base = super::linux_gnu_base::opts();
Target {
llvm_target: "armv7-unknown-linux-gnueabi".to_string(),
pointer_width: 32,

View File

@ -4,7 +4,7 @@ use crate::spec::{Target, TargetOptions};
// thumb-mode. See the thumbv7neon variant for enabling both.
pub fn target() -> Target {
let base = super::linux_base::opts();
let base = super::linux_gnu_base::opts();
Target {
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
pointer_width: 32,

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.cpu = "pentium4".to_string();
base.max_atomic_width = Some(64);
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());

View File

@ -20,7 +20,6 @@ pub fn opts() -> TargetOptions {
TargetOptions {
os: "linux".to_string(),
env: "gnu".to_string(),
dynamic_linking: true,
executables: true,
os_family: Some("unix".to_string()),

View File

@ -0,0 +1,5 @@
use crate::spec::TargetOptions;
pub fn opts() -> TargetOptions {
TargetOptions { env: "gnu".to_string(), ..super::linux_base::opts() }
}

View File

@ -14,7 +14,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
max_atomic_width: Some(32),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
max_atomic_width: Some(32),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
max_atomic_width: Some(32),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
max_atomic_width: Some(32),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -14,7 +14,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
mcount: "_mcount".to_string(),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -64,6 +64,7 @@ mod hermit_kernel_base;
mod illumos_base;
mod l4re_base;
mod linux_base;
mod linux_gnu_base;
mod linux_kernel_base;
mod linux_musl_base;
mod linux_uclibc_base;

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.cpu = "ppc64".to_string();
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
base.max_atomic_width = Some(64);

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.cpu = "ppc64le".to_string();
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
base.max_atomic_width = Some(64);

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
base.max_atomic_width = Some(32);

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mspe".to_string());
base.max_atomic_width = Some(32);

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
features: "+m,+a,+f,+d,+c".to_string(),
llvm_abiname: "ilp32d".to_string(),
max_atomic_width: Some(32),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -13,7 +13,7 @@ pub fn target() -> Target {
features: "+m,+a,+f,+d,+c".to_string(),
llvm_abiname: "lp64d".to_string(),
max_atomic_width: Some(64),
..super::linux_base::opts()
..super::linux_gnu_base::opts()
},
}
}

View File

@ -1,7 +1,7 @@
use crate::spec::Target;
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.endian = "big".to_string();
// z10 is the oldest CPU supported by LLVM
base.cpu = "z10".to_string();

View File

@ -1,7 +1,7 @@
use crate::spec::Target;
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.endian = "big".to_string();
base.cpu = "v9".to_string();
base.max_atomic_width = Some(64);

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.endian = "big".to_string();
base.cpu = "v9".to_string();
base.max_atomic_width = Some(64);

View File

@ -7,7 +7,7 @@ use crate::spec::{Target, TargetOptions};
// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf
pub fn target() -> Target {
let base = super::linux_base::opts();
let base = super::linux_gnu_base::opts();
Target {
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
pointer_width: 32,

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.cpu = "x86-64".to_string();
base.max_atomic_width = Some(64);
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());

View File

@ -1,7 +1,7 @@
use crate::spec::{LinkerFlavor, Target};
pub fn target() -> Target {
let mut base = super::linux_base::opts();
let mut base = super::linux_gnu_base::opts();
base.cpu = "x86-64".to_string();
base.max_atomic_width = Some(64);
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mx32".to_string());