Auto merge of #106476 - keith:ks/add-sanitizer-support-for-modern-ios-platforms, r=badboy
Add sanitizer support for modern iOS platforms asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.
This commit is contained in:
commit
6d819a4b8f
6 changed files with 49 additions and 10 deletions
|
@ -1,8 +1,11 @@
|
|||
use super::apple_base::{ios_llvm_target, opts, Arch};
|
||||
use crate::spec::{FramePointer, Target, TargetOptions};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("ios", arch);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
||||
Target {
|
||||
// Clang automatically chooses a more specific target based on
|
||||
// IPHONEOS_DEPLOYMENT_TARGET.
|
||||
|
@ -28,7 +31,7 @@ pub fn target() -> Target {
|
|||
darwinpcs\0\
|
||||
-Os\0"
|
||||
.into(),
|
||||
..opts("ios", arch)
|
||||
..base
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
use super::apple_base::{ios_sim_llvm_target, opts, Arch};
|
||||
use crate::spec::{FramePointer, Target, TargetOptions};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let arch = Arch::Arm64_sim;
|
||||
let mut base = opts("ios", arch);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
||||
Target {
|
||||
// Clang automatically chooses a more specific target based on
|
||||
// IPHONEOS_DEPLOYMENT_TARGET.
|
||||
|
@ -28,7 +31,7 @@ pub fn target() -> Target {
|
|||
darwinpcs\0\
|
||||
-Os\0"
|
||||
.into(),
|
||||
..opts("ios", arch)
|
||||
..base
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
use super::apple_base::{ios_sim_llvm_target, opts, Arch};
|
||||
use crate::spec::{StackProbeType, Target, TargetOptions};
|
||||
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let arch = Arch::X86_64_sim;
|
||||
let mut base = opts("ios", arch);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
||||
Target {
|
||||
llvm_target: ios_sim_llvm_target(arch).into(),
|
||||
pointer_width: 64,
|
||||
|
@ -12,7 +15,7 @@ pub fn target() -> Target {
|
|||
options: TargetOptions {
|
||||
max_atomic_width: Some(64),
|
||||
stack_probes: StackProbeType::X86,
|
||||
..opts("ios", arch)
|
||||
..base
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue