Add comment: data_layout

This commit is contained in:
Henri Lunnikivi 2024-10-04 19:18:25 +03:00
parent b22b348e0d
commit 7a0bac49c8
3 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,8 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
// The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also
// `options.llvm_abiname`.
data_layout: "e-m:e-p:32:32-i64:64-n32-S32".into(),
llvm_target: "riscv32".into(),
pointer_width: 32,
@ -11,6 +13,7 @@ pub fn target() -> Target {
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(),
max_atomic_width: Some(32),
atomic_cas: false,

View File

@ -2,6 +2,8 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
// The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also
// `options.llvm_abiname`.
data_layout: "e-m:e-p:32:32-i64:64-n32-S32".into(),
llvm_target: "riscv32".into(),
pointer_width: 32,
@ -11,6 +13,7 @@ pub fn target() -> Target {
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(),
max_atomic_width: Some(32),
atomic_cas: false,

View File

@ -2,6 +2,8 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
// The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also
// `options.llvm_abiname`.
data_layout: "e-m:e-p:32:32-i64:64-n32-S32".into(),
llvm_target: "riscv32".into(),
pointer_width: 32,
@ -11,6 +13,7 @@ pub fn target() -> Target {
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(),
max_atomic_width: Some(32),
atomic_cas: false,