mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
rustc_target: Rewrite sparc_unknown_linux_gnu spec to use TargetOptions
This commit is contained in:
parent
8f7175c199
commit
a194f42d21
@ -1,13 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{base, Cc, LinkerFlavor, Lld, Target};
|
||||
use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut base = base::linux_gnu::opts();
|
||||
base.endian = Endian::Big;
|
||||
base.cpu = "v9".into();
|
||||
base.max_atomic_width = Some(32);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mv8plus"]);
|
||||
|
||||
Target {
|
||||
llvm_target: "sparc-unknown-linux-gnu".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
@ -19,6 +13,15 @@ pub fn target() -> Target {
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".into(),
|
||||
arch: "sparc".into(),
|
||||
options: base,
|
||||
options: TargetOptions {
|
||||
cpu: "v9".into(),
|
||||
endian: Endian::Big,
|
||||
late_link_args: TargetOptions::link_args(
|
||||
LinkerFlavor::Gnu(Cc::Yes, Lld::No),
|
||||
&["-mv8plus"],
|
||||
),
|
||||
max_atomic_width: Some(32),
|
||||
..base::linux_gnu::opts()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user