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,13 +1,13 @@
use crate::spec::{LinkerFlavor, Target, TargetResult};
use crate::spec::{LinkerFlavor, Target};
pub fn target() -> TargetResult {
pub fn target() -> Target {
let mut base = super::linux_base::opts();
base.cpu = "pentium4".to_string();
base.max_atomic_width = Some(64);
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
base.stack_probes = true;
Ok(Target {
Target {
llvm_target: "i686-unknown-linux-gnu".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "32".to_string(),
@@ -21,5 +21,5 @@ pub fn target() -> TargetResult {
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: base,
})
}
}