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:
@@ -1,12 +1,12 @@
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
base.cpu = "mips32r2".to_string();
|
||||
base.features = "+mips32r2,+soft-float".to_string();
|
||||
base.max_atomic_width = Some(32);
|
||||
base.crt_static_default = false;
|
||||
Ok(Target {
|
||||
Target {
|
||||
llvm_target: "mips-unknown-linux-musl".to_string(),
|
||||
target_endian: "big".to_string(),
|
||||
target_pointer_width: "32".to_string(),
|
||||
@@ -18,5 +18,5 @@ pub fn target() -> TargetResult {
|
||||
target_vendor: "unknown".to_string(),
|
||||
linker_flavor: LinkerFlavor::Gcc,
|
||||
options: TargetOptions { target_mcount: "_mcount".to_string(), ..base },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user