From dd2315a5186ff23950efc7afaa36548513a2c7f9 Mon Sep 17 00:00:00 2001 From: songwei163 Date: Fri, 16 Sep 2022 22:22:17 +0800 Subject: [PATCH] fix m1 pro scrap compile error --- libs/scrap/build.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/scrap/build.rs b/libs/scrap/build.rs index b59dc03f3..8939cd214 100644 --- a/libs/scrap/build.rs +++ b/libs/scrap/build.rs @@ -13,7 +13,13 @@ fn link_vcpkg(mut path: PathBuf, name: &str) -> PathBuf { target_arch = "arm64".to_owned(); } let mut target = if target_os == "macos" { - "x64-osx".to_owned() + if target_arch == "x64" { + "x64-osx".to_owned() + } else if target_arch == "arm64"{ + "arm64-osx".to_owned() + } else { + format!("{}-{}", target_arch, target_os) + } } else if target_os == "windows" { "x64-windows-static".to_owned() } else {