compiler: Set target_abi = "ilp32e"
on all riscv32e targets
This allows compile-time configuration based on this. In the near future we should do this across all RISCV targets, probably, but this cfg is essential for building software usable on these targets.
This commit is contained in:
parent
c26db435bf
commit
9a81dc97fb
4 changed files with 10 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let abi = "ilp32e";
|
||||
Target {
|
||||
// The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also
|
||||
// `options.llvm_abiname`.
|
||||
|
@ -16,11 +17,12 @@ pub(crate) fn target() -> Target {
|
|||
arch: "riscv32".into(),
|
||||
|
||||
options: TargetOptions {
|
||||
abi: abi.into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
linker: Some("rust-lld".into()),
|
||||
cpu: "generic-rv32".into(),
|
||||
// The ilp32e ABI specifies the `data_layout`
|
||||
llvm_abiname: "ilp32e".into(),
|
||||
llvm_abiname: abi.into(),
|
||||
max_atomic_width: Some(32),
|
||||
atomic_cas: false,
|
||||
features: "+e,+forced-atomics".into(),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let abi = "ilp32e";
|
||||
Target {
|
||||
// The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also
|
||||
// `options.llvm_abiname`.
|
||||
|
@ -16,11 +17,12 @@ pub(crate) fn target() -> Target {
|
|||
arch: "riscv32".into(),
|
||||
|
||||
options: TargetOptions {
|
||||
abi: abi.into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
linker: Some("rust-lld".into()),
|
||||
cpu: "generic-rv32".into(),
|
||||
// The ilp32e ABI specifies the `data_layout`
|
||||
llvm_abiname: "ilp32e".into(),
|
||||
llvm_abiname: abi.into(),
|
||||
max_atomic_width: Some(32),
|
||||
atomic_cas: false,
|
||||
features: "+e,+m,+forced-atomics".into(),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let abi = "ilp32e";
|
||||
Target {
|
||||
// The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also
|
||||
// `options.llvm_abiname`.
|
||||
|
@ -16,11 +17,12 @@ pub(crate) fn target() -> Target {
|
|||
arch: "riscv32".into(),
|
||||
|
||||
options: TargetOptions {
|
||||
abi: abi.into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
linker: Some("rust-lld".into()),
|
||||
cpu: "generic-rv32".into(),
|
||||
// The ilp32e ABI specifies the `data_layout`
|
||||
llvm_abiname: "ilp32e".into(),
|
||||
llvm_abiname: abi.into(),
|
||||
max_atomic_width: Some(32),
|
||||
atomic_cas: false,
|
||||
features: "+e,+m,+c,+forced-atomics".into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue