Skip to content

Commit

Permalink
Add x86_64-unknown-linux-none target
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed May 11, 2024
1 parent 3349155 commit a3ef01b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,9 @@ supported_targets! {
("aarch64-unknown-linux-ohos", aarch64_unknown_linux_ohos),
("armv7-unknown-linux-ohos", armv7_unknown_linux_ohos),
("x86_64-unknown-linux-ohos", x86_64_unknown_linux_ohos),

("x86_64-unknown-linux-none", x86_64_unknown_linux_none),

}

/// Cow-Vec-Str: Cow<'static, [Cow<'static, str>]>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};

pub fn target() -> Target {
let mut base = base::linux::opts();
base.cpu = "x86-64".into();
base.max_atomic_width = Some(64);
base.stack_probes = StackProbeType::Inline;
base.linker_flavor = LinkerFlavor::Gnu(Cc::No, Lld::Yes);
base.linker = Some("rust-lld".into());

Target {
llvm_target: "x86_64-unknown-linux-none".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
},
pointer_width: 64,
data_layout:
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
arch: "x86_64".into(),
options: base,
}
}

0 comments on commit a3ef01b

Please sign in to comment.