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:
parent
f317a93d4d
commit
021fcbd90c
158 changed files with 619 additions and 630 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::linux_base::opts();
|
||||
base.cpu = "ppc64".to_string();
|
||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> TargetResult {
|
|||
// for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474
|
||||
base.relro_level = RelroLevel::Partial;
|
||||
|
||||
Ok(Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
|
||||
target_endian: "big".to_string(),
|
||||
target_pointer_width: "64".to_string(),
|
||||
|
@ -22,5 +22,5 @@ pub fn target() -> TargetResult {
|
|||
target_vendor: "unknown".to_string(),
|
||||
linker_flavor: LinkerFlavor::Gcc,
|
||||
options: TargetOptions { target_mcount: "_mcount".to_string(), ..base },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue