Add new target: x86_64-unknown-none-elf
This commit is contained in:
parent
5728bd64b4
commit
8aad5f45d5
@ -954,6 +954,8 @@ fn $module() {
|
||||
("armv6k-nintendo-3ds", armv6k_nintendo_3ds),
|
||||
|
||||
("armv7-unknown-linux-uclibceabihf", armv7_unknown_linux_uclibceabihf),
|
||||
|
||||
("x86_64-unknown-none-elf", x86_64_unknown_none_elf),
|
||||
}
|
||||
|
||||
/// Warnings encountered when parsing the target `json`.
|
||||
|
29
compiler/rustc_target/src/spec/x86_64_unknown_none_elf.rs
Normal file
29
compiler/rustc_target/src/spec/x86_64_unknown_none_elf.rs
Normal file
@ -0,0 +1,29 @@
|
||||
// Generic AArch64 target for bare-metal code - Floating point disabled
|
||||
//
|
||||
// Can be used in conjunction with the `target-feature` and
|
||||
// `target-cpu` compiler flags to opt-in more hardware-specific
|
||||
// features.
|
||||
//
|
||||
// For example, `-C target-cpu=cortex-a53`.
|
||||
|
||||
use super::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let opts = TargetOptions {
|
||||
abi: "softfloat".to_string(),
|
||||
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
|
||||
linker: Some("rust-lld".to_owned()),
|
||||
features: "-mmx,-sse,+soft-float".to_string(),
|
||||
executables: true,
|
||||
disable_redzone: true,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
..Default::default()
|
||||
};
|
||||
Target {
|
||||
llvm_target: "x86_64-unknown-none-elf".to_string(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128".to_string(),
|
||||
arch: "x86_64".to_string(),
|
||||
options: opts,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user