Rollup merge of #108722 - petrhosek:fuchsia-riscv, r=petrochenkov
Support for Fuchsia RISC-V target Fuchsia is in the process of implementing the RISC-V support. This change implements the minimal Rust compiler support. The support for building runtime libraries will be implemented in follow up changes once Fuchsia SDK has the RISC-V support.
This commit is contained in:
commit
e006ee9be8
3 changed files with 21 additions and 0 deletions
|
@ -1115,6 +1115,7 @@ supported_targets! {
|
|||
// FIXME(#106649): Remove aarch64-fuchsia in favor of aarch64-unknown-fuchsia
|
||||
("aarch64-fuchsia", aarch64_fuchsia),
|
||||
("aarch64-unknown-fuchsia", aarch64_unknown_fuchsia),
|
||||
("riscv64gc-unknown-fuchsia", riscv64gc_unknown_fuchsia),
|
||||
// FIXME(#106649): Remove x86_64-fuchsia in favor of x86_64-unknown-fuchsia
|
||||
("x86_64-fuchsia", x86_64_fuchsia),
|
||||
("x86_64-unknown-fuchsia", x86_64_unknown_fuchsia),
|
||||
|
|
19
compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs
Normal file
19
compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
use crate::spec::{CodeModel, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "riscv64gc-unknown-fuchsia".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||
arch: "riscv64".into(),
|
||||
options: TargetOptions {
|
||||
code_model: Some(CodeModel::Medium),
|
||||
cpu: "generic-rv64".into(),
|
||||
features: "+m,+a,+f,+d,+c".into(),
|
||||
llvm_abiname: "lp64d".into(),
|
||||
max_atomic_width: Some(64),
|
||||
supported_sanitizers: SanitizerSet::SHADOWCALLSTACK,
|
||||
..super::fuchsia_base::opts()
|
||||
},
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue