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:
parent
be89cfc131
commit
e4308bb0bd
1 changed files with 5 additions and 0 deletions
5
build.rs
5
build.rs
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue