Skip to content

Commit 7f88049

Browse files
jam1garnerleo60228
authored andcommitted
Remove unneeded options from Nintendo Switch target
1 parent bee373c commit 7f88049

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

compiler/rustc_target/src/spec/aarch64_nintendo_switch.rs

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,23 @@ const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_linker_scrip
44

55
/// A base target for Nintendo Switch devices using a pure LLVM toolchain.
66
pub fn target() -> Target {
7-
let mut opts = TargetOptions {
8-
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
9-
linker: Some("rust-lld".into()),
10-
link_script: Some(LINKER_SCRIPT.into()),
11-
os: "horizon".into(),
12-
max_atomic_width: Some(128),
13-
panic_strategy: PanicStrategy::Abort,
14-
position_independent_executables: true,
15-
crt_static_default: false,
16-
crt_static_respected: false,
17-
dynamic_linking: true,
18-
executables: true,
19-
has_elf_tls: false,
20-
has_rpath: false,
21-
relro_level: RelroLevel::Off,
22-
..Default::default()
23-
};
24-
25-
opts.pre_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), vec![]);
26-
27-
opts.post_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), vec![]);
28-
297
Target {
308
llvm_target: "aarch64-unknown-none".into(),
319
pointer_width: 64,
3210
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
3311
arch: "aarch64".into(),
34-
options: opts,
12+
options: TargetOptions {
13+
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
14+
linker: Some("rust-lld".into()),
15+
link_script: Some(LINKER_SCRIPT.into()),
16+
os: "horizon".into(),
17+
max_atomic_width: Some(128),
18+
panic_strategy: PanicStrategy::Abort,
19+
position_independent_executables: true,
20+
dynamic_linking: true,
21+
executables: true,
22+
relro_level: RelroLevel::Off,
23+
..Default::default()
24+
},
3525
}
3626
}

0 commit comments

Comments
 (0)