Enable kernel sanitizers for aarch64-unknown-none-softfloat

We want kernels to be able to use this bare metal target, so
let's enable the sanitizers that kernels want to use.

(cherry picked from commit 6b06aa6192)
This commit is contained in:
Jubilee Young 2025-01-22 14:07:43 -08:00 committed by Josh Stone
parent 01283c450e
commit bf24cade3e

View file

@ -7,7 +7,8 @@
// For example, `-C target-cpu=cortex-a53`.
use crate::spec::{
Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, StackProbeType, Target, TargetOptions,
Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, StackProbeType, Target,
TargetOptions,
};
pub(crate) fn target() -> Target {
@ -19,6 +20,7 @@ pub(crate) fn target() -> Target {
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::default()