Skip to content

Commit ae5d448

Browse files
committed
Add x86_64-unknown-trusty as tier 3
1 parent fd2c811 commit ae5d448

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,7 @@ supported_targets! {
17921792

17931793
("armv7-unknown-trusty", armv7_unknown_trusty),
17941794
("aarch64-unknown-trusty", aarch64_unknown_trusty),
1795+
("x86_64-unknown-trusty", x86_64_unknown_trusty),
17951796

17961797
("riscv32i-unknown-none-elf", riscv32i_unknown_none_elf),
17971798
("riscv32im-risc0-zkvm-elf", riscv32im_risc0_zkvm_elf),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Trusty OS target for X86_64.
2+
3+
use crate::spec::{
4+
LinkSelfContainedDefault, PanicStrategy, RelroLevel, StackProbeType, Target, TargetOptions,
5+
};
6+
7+
pub(crate) fn target() -> Target {
8+
Target {
9+
llvm_target: "x86_64-unknown-unknown-musl".into(),
10+
metadata: crate::spec::TargetMetadata {
11+
description: Some("x86_64 Trusty".into()),
12+
tier: Some(3),
13+
host_tools: Some(false),
14+
std: Some(false),
15+
},
16+
pointer_width: 64,
17+
data_layout:
18+
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
19+
arch: "x86_64".into(),
20+
options: TargetOptions {
21+
executables: true,
22+
max_atomic_width: Some(64),
23+
panic_strategy: PanicStrategy::Abort,
24+
os: "trusty".into(),
25+
link_self_contained: LinkSelfContainedDefault::InferredForMusl,
26+
position_independent_executables: true,
27+
static_position_independent_executables: true,
28+
crt_static_default: true,
29+
crt_static_respected: true,
30+
dynamic_linking: false,
31+
plt_by_default: false,
32+
relro_level: RelroLevel::Full,
33+
stack_probes: StackProbeType::Inline,
34+
mcount: "\u{1}_mcount".into(),
35+
..Default::default()
36+
},
37+
}
38+
}

src/doc/rustc/src/platform-support.md

+1
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ target | std | host | notes
386386
[`x86_64-unknown-hermit`](platform-support/hermit.md) | ✓ | | x86_64 Hermit
387387
`x86_64-unknown-l4re-uclibc` | ? | |
388388
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
389+
[`x86_64-unknown-trusty`](platform-support/trusty.md) | ? | |
389390
`x86_64-uwp-windows-gnu` | ✓ | |
390391
`x86_64-uwp-windows-msvc` | ✓ | |
391392
[`x86_64-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 64-bit Windows 7 support

tests/assembly/targets/targets-elf.rs

+3
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,9 @@
591591
//@ revisions: x86_64_unknown_redox
592592
//@ [x86_64_unknown_redox] compile-flags: --target x86_64-unknown-redox
593593
//@ [x86_64_unknown_redox] needs-llvm-components: x86
594+
//@ revisions: x86_64_unknown_trusty
595+
//@ [x86_64_unknown_trusty] compile-flags: --target x86_64-unknown-trusty
596+
//@ [x86_64_unknown_trusty] needs-llvm-components: x86
594597
//@ revisions: x86_64_wrs_vxworks
595598
//@ [x86_64_wrs_vxworks] compile-flags: --target x86_64-wrs-vxworks
596599
//@ [x86_64_wrs_vxworks] needs-llvm-components: x86

0 commit comments

Comments
 (0)