diff --git a/crates/std_detect/src/detect/mod.rs b/crates/std_detect/src/detect/mod.rs index ae86ca987e..ab247a303e 100644 --- a/crates/std_detect/src/detect/mod.rs +++ b/crates/std_detect/src/detect/mod.rs @@ -66,8 +66,8 @@ cfg_if! { } else if #[cfg(all(target_os = "windows", any(target_arch = "aarch64", target_arch = "arm64ec")))] { #[path = "os/windows/aarch64.rs"] mod os; - } else if #[cfg(all(target_os = "macos", target_arch = "aarch64", feature = "libc"))] { - #[path = "os/macos/aarch64.rs"] + } else if #[cfg(all(target_vendor = "apple", target_arch = "aarch64", feature = "libc"))] { + #[path = "os/darwin/aarch64.rs"] mod os; } else { #[path = "os/other.rs"] diff --git a/crates/std_detect/src/detect/os/macos/aarch64.rs b/crates/std_detect/src/detect/os/darwin/aarch64.rs similarity index 94% rename from crates/std_detect/src/detect/os/macos/aarch64.rs rename to crates/std_detect/src/detect/os/darwin/aarch64.rs index a29968b5c3..3f292c1b1b 100644 --- a/crates/std_detect/src/detect/os/macos/aarch64.rs +++ b/crates/std_detect/src/detect/os/darwin/aarch64.rs @@ -1,4 +1,6 @@ -//! Run-time feature detection for aarch64 on macOS. +//! Run-time feature detection for aarch64 on Darwin (macOS/iOS/tvOS/watchOS/visionOS). +//! +//! use crate::detect::{cache, Feature}; diff --git a/crates/std_detect/tests/cpu-detection.rs b/crates/std_detect/tests/cpu-detection.rs index cecc53afa4..53fbf6d8c1 100644 --- a/crates/std_detect/tests/cpu-detection.rs +++ b/crates/std_detect/tests/cpu-detection.rs @@ -188,8 +188,8 @@ fn aarch64_bsd() { } #[test] -#[cfg(all(target_arch = "aarch64", target_os = "macos"))] -fn aarch64_macos() { +#[cfg(all(target_arch = "aarch64", target_vendor = "apple"))] +fn aarch64_darwin() { println!("asimd: {:?}", is_aarch64_feature_detected!("asimd")); println!("fp: {:?}", is_aarch64_feature_detected!("fp")); println!("fp16: {:?}", is_aarch64_feature_detected!("fp16")); diff --git a/crates/stdarch-test/src/disassembly.rs b/crates/stdarch-test/src/disassembly.rs index 206942a4b4..cb6c008a71 100644 --- a/crates/stdarch-test/src/disassembly.rs +++ b/crates/stdarch-test/src/disassembly.rs @@ -74,8 +74,8 @@ pub(crate) fn disassemble_myself() -> HashSet { 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"] diff --git a/triagebot.toml b/triagebot.toml index 81b8611405..082c8cf2c6 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -43,10 +43,10 @@ resolved/implemented on Fuchsia. Could one of you weigh in please? Thanks! """ -[ping.macos] +[ping.apple] +alias = ["macos", "ios", "tvos", "watchos", "visionos"] message = """\ -Hey MacOS Group! This issue or PR could use some MacOS-specific guidance. Could +Hey Apple Group! This issue or PR could use some Darwin-specific guidance. Could one of you weigh in please? Thanks! """ -