Skip to content
Open
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
Expand Up @@ -7,7 +7,7 @@
// For example, `-C target-cpu=cortex-a53`.

use crate::spec::{
Arch, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, StackProbeType, Target,
Arch, Cc, LinkerFlavor, Lld, PanicStrategy, SanitizerSet, StackProbeType, Target,
TargetMetadata, TargetOptions,
};

Expand All @@ -22,12 +22,13 @@ pub(crate) fn target() -> Target {
),
features: "+v8a,+strict-align,+neon".into(),
supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS,
relocation_model: RelocModel::Static,
disable_redzone: true,
max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline,
panic_strategy: PanicStrategy::Abort,
default_uwtable: true,
position_independent_executables: true,
static_position_independent_executables: true,
..Default::default()
};
Target {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// For example, `-C target-cpu=cortex-a53`.

use crate::spec::{
Abi, Arch, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, StackProbeType,
Target, TargetMetadata, TargetOptions,
Abi, Arch, Cc, LinkerFlavor, Lld, PanicStrategy, SanitizerSet, StackProbeType, Target,
TargetMetadata, TargetOptions,
};

pub(crate) fn target() -> Target {
Expand All @@ -17,13 +17,14 @@ pub(crate) fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
features: "+v8a,+strict-align,-neon".into(),
relocation_model: RelocModel::Static,
disable_redzone: true,
max_atomic_width: Some(128),
supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS,
stack_probes: StackProbeType::Inline,
panic_strategy: PanicStrategy::Abort,
default_uwtable: true,
position_independent_executables: true,
static_position_independent_executables: true,
..Default::default()
};
Target {
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen-llvm/abi-efiapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use minicore::*;

//x86_64: define win64cc void @has_efiapi
//i686: define void @has_efiapi
//aarch64: define dso_local void @has_efiapi
//aarch64: define void @has_efiapi
Copy link
Member

@tshepang tshepang Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows test to pass for custom aarch64 targets that have RelocModel::Static

Suggested change
//aarch64: define void @has_efiapi
//aarch64: define{{( dso_local)?} void @has_efiapi

//arm: define dso_local arm_aapcscc void @has_efiapi
//riscv: define dso_local void @has_efiapi
#[no_mangle]
Expand Down
Loading