Skip to content

Add aarch64_be-unknown-hermit target #145761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,7 @@ supported_targets! {

("msp430-none-elf", msp430_none_elf),

("aarch64_be-unknown-hermit", aarch64_be_unknown_hermit),
("aarch64-unknown-hermit", aarch64_unknown_hermit),
("riscv64gc-unknown-hermit", riscv64gc_unknown_hermit),
("x86_64-unknown-hermit", x86_64_unknown_hermit),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use rustc_abi::Endian;

use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};

pub(crate) fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-hermit".into(),
metadata: TargetMetadata {
description: Some("ARM64 Hermit (big-endian)".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
arch: "aarch64".into(),
data_layout: "E-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
options: TargetOptions {
features: "+v8a,+strict-align,+neon,+fp-armv8".into(),
max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline,
endian: Endian::Big,
..base::hermit::opts()
},
}
}
1 change: 1 addition & 0 deletions src/bootstrap/src/core/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub struct Finder {
const STAGE0_MISSING_TARGETS: &[&str] = &[
"armv7a-vex-v5",
// just a dummy comment so the list doesn't get onelined
"aarch64_be-unknown-hermit",
"aarch64_be-unknown-none-softfloat",
];

Expand Down
1 change: 1 addition & 0 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ target | std | host | notes
[`aarch64-unknown-trusty`](platform-support/trusty.md) | ✓ | |
[`aarch64-uwp-windows-msvc`](platform-support/uwp-windows-msvc.md) | ✓ | |
[`aarch64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | | ARM64 VxWorks OS
[`aarch64_be-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit (big-endian)
`aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian)
`aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI)
[`aarch64_be-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | ARM64 NetBSD (big-endian)
Expand Down
2 changes: 2 additions & 0 deletions src/doc/rustc/src/platform-support/hermit.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Target triplets available so far:

- `x86_64-unknown-hermit`
- `aarch64-unknown-hermit`
- `aarch64_be-unknown-hermit`
- `riscv64gc-unknown-hermit`

## Target maintainers
Expand Down Expand Up @@ -42,6 +43,7 @@ target = [
"<HOST_TARGET>",
"x86_64-unknown-hermit",
"aarch64-unknown-hermit",
"aarch64_be-unknown-hermit",
"riscv64gc-unknown-hermit",
]

Expand Down
3 changes: 3 additions & 0 deletions tests/assembly-llvm/targets/targets-elf.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//@ add-core-stubs
//@ assembly-output: emit-asm
// ignore-tidy-linelength
//@ revisions: aarch64_be_unknown_hermit
//@ [aarch64_be_unknown_hermit] compile-flags: --target aarch64_be-unknown-hermit
//@ [aarch64_be_unknown_hermit] needs-llvm-components: aarch64
//@ revisions: aarch64_be_unknown_linux_gnu
//@ [aarch64_be_unknown_linux_gnu] compile-flags: --target aarch64_be-unknown-linux-gnu
//@ [aarch64_be_unknown_linux_gnu] needs-llvm-components: aarch64
Expand Down
Loading