Skip to content

Commit a194f42

Browse files
committed
rustc_target: Rewrite sparc_unknown_linux_gnu spec to use TargetOptions
1 parent 8f7175c commit a194f42

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
use crate::abi::Endian;
2-
use crate::spec::{base, Cc, LinkerFlavor, Lld, Target};
2+
use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions};
33

44
pub fn target() -> Target {
5-
let mut base = base::linux_gnu::opts();
6-
base.endian = Endian::Big;
7-
base.cpu = "v9".into();
8-
base.max_atomic_width = Some(32);
9-
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mv8plus"]);
10-
115
Target {
126
llvm_target: "sparc-unknown-linux-gnu".into(),
137
metadata: crate::spec::TargetMetadata {
@@ -19,6 +13,15 @@ pub fn target() -> Target {
1913
pointer_width: 32,
2014
data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".into(),
2115
arch: "sparc".into(),
22-
options: base,
16+
options: TargetOptions {
17+
cpu: "v9".into(),
18+
endian: Endian::Big,
19+
late_link_args: TargetOptions::link_args(
20+
LinkerFlavor::Gnu(Cc::Yes, Lld::No),
21+
&["-mv8plus"],
22+
),
23+
max_atomic_width: Some(32),
24+
..base::linux_gnu::opts()
25+
},
2326
}
2427
}

0 commit comments

Comments
 (0)