1
Fork 0

rustc_target: Refactor away TargetResult

Construction of a built-in target is always infallible now, so `TargetResult` is no longer necessary.
This commit is contained in:
Vadim Petrochenkov 2020-10-05 15:37:55 +03:00
parent f317a93d4d
commit 021fcbd90c
158 changed files with 619 additions and 630 deletions

View file

@ -1,12 +1,12 @@
use crate::spec::{LinkerFlavor, Target, TargetResult};
use crate::spec::{LinkerFlavor, Target};
pub fn target() -> TargetResult {
pub fn target() -> Target {
let mut base = super::openbsd_base::opts();
base.cpu = "v9".to_string();
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
base.max_atomic_width = Some(64);
Ok(Target {
Target {
llvm_target: "sparc64-unknown-openbsd".to_string(),
target_endian: "big".to_string(),
target_pointer_width: "64".to_string(),
@ -18,5 +18,5 @@ pub fn target() -> TargetResult {
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
})
}
}