0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-25 00:29:14 -05:00

build: patch GN's host_cpu detection on Apple Silicon (#640)

This commit is contained in:
Aaron O'Mullan 2021-03-07 02:17:33 +01:00 committed by GitHub
parent be89cfc131
commit e4308bb0bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,11 @@ fn build_v8() {
gn_args.push("v8_enable_handle_zapping=false".to_string());
}
// Fix GN's host_cpu detection when using x86_64 bins on Apple Silicon
if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") {
gn_args.push("host_cpu=\"arm64\"".to_string())
}
if let Some(clang_base_path) = find_compatible_system_clang() {
println!("clang_base_path {}", clang_base_path.display());
gn_args.push(format!("clang_base_path={:?}", clang_base_path));