Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: Set target_abi = "ilp32e" on all riscv32e targets #134358

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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`.
Expand All @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -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`.
Expand All @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -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`.
Expand All @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/well-known-values.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
LL | target_abi = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `fortanix`, `ilp32`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, and `x32`
= note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `fortanix`, `ilp32`, `ilp32e`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, and `x32`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
Expand Down
Loading