From da0825bff02201d75387739dc5b70e9b1243c0ed Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 18 Dec 2022 06:11:46 +0100 Subject: [PATCH] deps: upgrade Ninja and GN (#1160) Ninja and GN are upgraded to the version specified in V8's `DEPS` file as of V8 11.0.226.2. As part of this upgrade, native binaries for linux-arm64 and mac-arm64 were added to the repository, and some directories were renamed to make the overall naming scheme more consistent. --- build.rs | 25 +++++++++++++------------ tools/ninja_gn_binaries.py | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/build.rs b/build.rs index 2f2121ed..1d0abc2e 100644 --- a/build.rs +++ b/build.rs @@ -248,25 +248,26 @@ fn maybe_install_sysroot(arch: &str) { } } -fn platform() -> &'static str { - #[cfg(target_os = "windows")] - { - "win" - } +fn platform() -> String { #[cfg(target_os = "linux")] - { - "linux64" - } + let os = "linux"; #[cfg(target_os = "macos")] - { - "mac" - } + let os = "mac"; + #[cfg(target_os = "windows")] + let os = "windows"; + + #[cfg(target_arch = "x86_64")] + let arch = "amd64"; + #[cfg(target_arch = "aarch64")] + let arch = "arm64"; + + format!("{os}-{arch}") } fn download_ninja_gn_binaries() { let target_dir = build_dir(); let bin_dir = target_dir - .join("ninja_gn_binaries-20220517") + .join("ninja_gn_binaries-20221218") .join(platform()); let gn = bin_dir.join("gn"); let ninja = bin_dir.join("ninja"); diff --git a/tools/ninja_gn_binaries.py b/tools/ninja_gn_binaries.py index c359bef0..3af810fb 100755 --- a/tools/ninja_gn_binaries.py +++ b/tools/ninja_gn_binaries.py @@ -18,7 +18,7 @@ except ImportError: # For Py3 compatibility from urllib.error import HTTPError, URLError from urllib.request import urlopen -URL = "https://github.com/denoland/ninja_gn_binaries/archive/20220517.tar.gz" +URL = "https://github.com/denoland/ninja_gn_binaries/archive/20221218.tar.gz" DIR = None