Skip to content

Commit 0b269f3

Browse files
committed
add kernel target for RustyHermit
Currently, we are thinking to use *-unknown-none targets instead to define for every platform our own one (see hermit-os/hermit-rs#197). However, the current target aarch64-unknown-none-softfloat doesn't support dynamic relocation. Our kernel uses this feature and consequently we define a new target aarch64-unknown-hermitkernel to support it.
1 parent 2a8dbdb commit 0b269f3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use crate::spec::Target;
33
pub fn target() -> Target {
44
let mut base = super::hermit_base::opts();
55
base.max_atomic_width = Some(128);
6+
base.features = "+strict-align,+neon,+fp-armv8".to_string();
67

78
Target {
89
llvm_target: "aarch64-unknown-hermit".to_string(),
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use crate::spec::Target;
2+
3+
pub fn target() -> Target {
4+
let mut base = super::hermit_kernel_base::opts();
5+
base.max_atomic_width = Some(128);
6+
base.abi = "softfloat".to_string();
7+
base.features = "+strict-align,-neon,-fp-armv8".to_string();
8+
9+
Target {
10+
llvm_target: "aarch64-unknown-hermit".to_string(),
11+
pointer_width: 64,
12+
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
13+
arch: "aarch64".to_string(),
14+
options: base,
15+
}
16+
}

0 commit comments

Comments
 (0)