Skip to content

Commit

Permalink
add kernel target for RustyHermit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stlankes committed Feb 8, 2022
1 parent 2a8dbdb commit 0b269f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs
Expand Up @@ -3,6 +3,7 @@ use crate::spec::Target;
pub fn target() -> Target {
let mut base = super::hermit_base::opts();
base.max_atomic_width = Some(128);
base.features = "+strict-align,+neon,+fp-armv8".to_string();

Target {
llvm_target: "aarch64-unknown-hermit".to_string(),
Expand Down
16 changes: 16 additions & 0 deletions compiler/rustc_target/src/spec/aarch64_unknown_hermitkernel.rs
@@ -0,0 +1,16 @@
use crate::spec::Target;

pub fn target() -> Target {
let mut base = super::hermit_kernel_base::opts();
base.max_atomic_width = Some(128);
base.abi = "softfloat".to_string();
base.features = "+strict-align,-neon,-fp-armv8".to_string();

Target {
llvm_target: "aarch64-unknown-hermit".to_string(),
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
options: base,
}
}

0 comments on commit 0b269f3

Please sign in to comment.