diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-09-07 14:13:02 +0200 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2024-09-14 04:25:01 +0100 |
| commit | 8a511191a0cf9290270e1a0f25bb0c26f9a56077 (patch) | |
| tree | 672e26023a2a23c47dfe6fd8f9467b0ab4ef464a /library/stdarch/crates/stdarch-test/src/disassembly.rs | |
| parent | 0fb034979a007363ba3237431934a16a165765de (diff) | |
| download | rust-8a511191a0cf9290270e1a0f25bb0c26f9a56077.tar.gz rust-8a511191a0cf9290270e1a0f25bb0c26f9a56077.zip | |
Enable feature detection on all Apple/Darwin targets
Tested in the simulator and on the device I had lying around, a 1st generation iPad Mini (which isn't Aarch64, but shows that the `sysctlbyname` calls still work even there, even if they return false). `sysctlbyname` _should_ be safe to use without causing rejections from the app store, as its usage is documented in: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics Also, the standard library will use these soon anyhow, so this shouldn't affect the situation: https://github.com/rust-lang/rust/pull/129019
Diffstat (limited to 'library/stdarch/crates/stdarch-test/src/disassembly.rs')
| -rw-r--r-- | library/stdarch/crates/stdarch-test/src/disassembly.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/stdarch/crates/stdarch-test/src/disassembly.rs b/library/stdarch/crates/stdarch-test/src/disassembly.rs index 206942a4b48..cb6c008a71b 100644 --- a/library/stdarch/crates/stdarch-test/src/disassembly.rs +++ b/library/stdarch/crates/stdarch-test/src/disassembly.rs @@ -74,8 +74,8 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> { let me = env::current_exe().expect("failed to get current exe"); let objdump = env::var("OBJDUMP").unwrap_or_else(|_| "objdump".to_string()); - let add_args = if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") { - // Target features need to be enabled for LLVM objdump on Macos ARM64 + let add_args = if cfg!(target_vendor = "apple") && cfg!(target_arch = "aarch64") { + // Target features need to be enabled for LLVM objdump on Darwin ARM64 vec!["--mattr=+v8.6a,+crypto,+tme"] } else if cfg!(target_arch = "riscv64") { vec!["--mattr=+zk,+zks,+zbc,+zbb"] |
