1
Fork 0

rename LLVM target for RustyHermit

RustyHermit ist is a library operating system. In this case, we link a static library as kernel to the application. The final result is a bootable application. The library and the application have to use the same target. Currently, the targets are different (see also https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs). Consequently, this commit change the LLVM target to 'hermit'.

This kernel spec is needed to disable the usage of FPU registers, which are not allowed in kernel space. In contrast to Linux, everything is running in ring 0 and also in the same address space.

Signed-off-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
This commit is contained in:
Stefan Lankes 2021-05-05 01:03:50 +02:00
parent dc5f2cd266
commit 76f884abb9

View file

@ -11,7 +11,7 @@ pub fn target() -> Target {
base.stack_probes = StackProbeType::Call; base.stack_probes = StackProbeType::Call;
Target { Target {
llvm_target: "x86_64-unknown-none-elf".to_string(), llvm_target: "x86_64-unknown-hermit".to_string(),
pointer_width: 64, pointer_width: 64,
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
.to_string(), .to_string(),