Skip to content

Commit a3ef01b

Browse files
committed
Add x86_64-unknown-linux-none target
1 parent 3349155 commit a3ef01b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,9 @@ supported_targets! {
17741774
("aarch64-unknown-linux-ohos", aarch64_unknown_linux_ohos),
17751775
("armv7-unknown-linux-ohos", armv7_unknown_linux_ohos),
17761776
("x86_64-unknown-linux-ohos", x86_64_unknown_linux_ohos),
1777+
1778+
("x86_64-unknown-linux-none", x86_64_unknown_linux_none),
1779+
17771780
}
17781781

17791782
/// Cow-Vec-Str: Cow<'static, [Cow<'static, str>]>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};
2+
3+
pub fn target() -> Target {
4+
let mut base = base::linux::opts();
5+
base.cpu = "x86-64".into();
6+
base.max_atomic_width = Some(64);
7+
base.stack_probes = StackProbeType::Inline;
8+
base.linker_flavor = LinkerFlavor::Gnu(Cc::No, Lld::Yes);
9+
base.linker = Some("rust-lld".into());
10+
11+
Target {
12+
llvm_target: "x86_64-unknown-linux-none".into(),
13+
metadata: crate::spec::TargetMetadata {
14+
description: None,
15+
tier: None,
16+
host_tools: None,
17+
std: None,
18+
},
19+
pointer_width: 64,
20+
data_layout:
21+
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
22+
arch: "x86_64".into(),
23+
options: base,
24+
}
25+
}

0 commit comments

Comments
 (0)