Skip to content

Commit

Permalink
Add comment: data_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
hegza committed Oct 5, 2024
1 parent b22b348 commit 7a0bac4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 7a0bac4

Please sign in to comment.