Skip to content

Commit f0d0573

Browse files
committed
rustc_target: Do not specify some target options redundantly
These values are already inherited
1 parent 2e83c22 commit f0d0573

6 files changed

+3
-12
lines changed

compiler/rustc_target/src/spec/aarch64_nintendo_switch_freestanding.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub fn target() -> Target {
1818
panic_strategy: PanicStrategy::Abort,
1919
position_independent_executables: true,
2020
dynamic_linking: true,
21-
executables: true,
2221
relro_level: RelroLevel::Off,
2322
..Default::default()
2423
},

compiler/rustc_target/src/spec/android_base.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pub fn opts() -> TargetOptions {
44
let mut base = super::linux_base::opts();
55
base.os = "android".into();
66
base.default_dwarf_version = 2;
7-
base.position_independent_executables = true;
87
base.has_thread_local = false;
98
// This is for backward compatibility, see https://github.com/rust-lang/rust/issues/49867
109
// for context. (At that time, there was no `-C force-unwind-tables`, so the only solution

compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pub fn target() -> Target {
1010
base.crt_static_default = false;
1111
base.has_rpath = true;
1212
base.linker_is_gnu = false;
13-
base.dynamic_linking = true;
1413

1514
base.c_enum_min_bits = 8;
1615

compiler/rustc_target/src/spec/powerpc_unknown_freebsd.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::abi::Endian;
2-
use crate::spec::{LinkerFlavor, RelocModel, Target, TargetOptions};
2+
use crate::spec::{LinkerFlavor, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
let mut base = super::freebsd_base::opts();
@@ -15,7 +15,6 @@ pub fn target() -> Target {
1515
options: TargetOptions {
1616
endian: Endian::Big,
1717
features: "+secure-plt".into(),
18-
relocation_model: RelocModel::Pic,
1918
mcount: "_mcount".into(),
2019
..base
2120
},

compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ pub fn target() -> Target {
44
let mut base = super::l4re_base::opts();
55
base.cpu = "x86-64".into();
66
base.max_atomic_width = Some(64);
7-
base.crt_static_allows_dylibs = false;
8-
base.dynamic_linking = false;
97
base.panic_strategy = PanicStrategy::Abort;
108

119
Target {

compiler/rustc_target/src/spec/x86_64_unknown_none.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
// `target-cpu` compiler flags to opt-in more hardware-specific
55
// features.
66

7-
use super::{
8-
CodeModel, LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, RelroLevel, StackProbeType,
9-
Target, TargetOptions,
10-
};
7+
use super::{CodeModel, LinkerFlavor, LldFlavor, PanicStrategy};
8+
use super::{RelroLevel, StackProbeType, Target, TargetOptions};
119

1210
pub fn target() -> Target {
1311
let opts = TargetOptions {
@@ -18,7 +16,6 @@ pub fn target() -> Target {
1816
position_independent_executables: true,
1917
static_position_independent_executables: true,
2018
relro_level: RelroLevel::Full,
21-
relocation_model: RelocModel::Pic,
2219
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
2320
linker: Some("rust-lld".into()),
2421
features:

0 commit comments

Comments
 (0)