From 06b89b2d1896dcf04a597d66773001303be50910 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Fri, 17 Mar 2023 22:30:55 +1100 Subject: [PATCH] Add alias `universal2-apple-darwin` to `universal-apple-darwin` (#919) Signed-off-by: Jiahao XU --- crates/detect-targets/src/detect/macos.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/detect-targets/src/detect/macos.rs b/crates/detect-targets/src/detect/macos.rs index 58fc7fe8..dccd6b65 100644 --- a/crates/detect-targets/src/detect/macos.rs +++ b/crates/detect-targets/src/detect/macos.rs @@ -5,6 +5,7 @@ use tokio::process::Command; const AARCH64: &str = "aarch64-apple-darwin"; const X86: &str = "x86_64-apple-darwin"; const UNIVERSAL: &str = "universal-apple-darwin"; +const UNIVERSAL2: &str = "universal2-apple-darwin"; async fn is_x86_64_supported() -> io::Result { let exit_status = Command::new("arch") @@ -24,9 +25,10 @@ pub(super) async fn detect_alternative_targets(target: &str) -> impl Iterator [ is_x86_64_supported().await.unwrap_or(false).then_some(X86), Some(UNIVERSAL), + Some(UNIVERSAL2), ], - X86 => [Some(UNIVERSAL), None], - _ => [None, None], + X86 => [Some(UNIVERSAL), Some(UNIVERSAL2), None], + _ => [None, None, None], } .into_iter() .flatten()