From 0648830632e1426bc7d760c83307665307bb241a Mon Sep 17 00:00:00 2001 From: Wang Qing Date: Wed, 5 Jul 2023 17:34:46 +0000 Subject: [PATCH] loongarch64: Add loongarch64 architecture detection support. Bug: 1361860 Change-Id: I432208fd78fb99140a97b3979a257f4e2e513807 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3886536 Commit-Queue: Robbie Iannucci Reviewed-by: Brian Ryner Reviewed-by: Gavin Mak --- cipd | 3 +++ detect_host_arch.py | 2 ++ gclient.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cipd b/cipd index dc305f8aa3..86d3a4f193 100755 --- a/cipd +++ b/cipd @@ -79,6 +79,9 @@ if [ -z $ARCH ]; then riscv64) ARCH=riscv64 ;; + loongarch64) + ARCH=loong64 + ;; *) >&2 echo "UNKNOWN Machine architecture: ${UNAME}" exit 1 diff --git a/detect_host_arch.py b/detect_host_arch.py index 4294800fe6..87ac19df57 100755 --- a/detect_host_arch.py +++ b/detect_host_arch.py @@ -34,6 +34,8 @@ def HostArch(): host_arch = 's390' elif host_arch.startswith('riscv'): host_arch = 'riscv64' + elif host_arch.startswith('loongarch64'): + host_arch = 'loong64' if host_arch == 'arm64': host_platform = platform.architecture() diff --git a/gclient.py b/gclient.py index 60346178f2..ac97dc01a9 100755 --- a/gclient.py +++ b/gclient.py @@ -1369,7 +1369,6 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): 'checkout_mac': 'mac' in self.target_os, 'checkout_win': 'win' in self.target_os, 'host_os': _detect_host_os(), - 'checkout_arm': 'arm' in self.target_cpu, 'checkout_arm64': 'arm64' in self.target_cpu, 'checkout_x86': 'x86' in self.target_cpu, @@ -1378,6 +1377,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): 'checkout_ppc': 'ppc' in self.target_cpu, 'checkout_s390': 's390' in self.target_cpu, 'checkout_x64': 'x64' in self.target_cpu, + 'checkout_loong64': 'loong64' in self.target_cpu, 'host_cpu': detect_host_arch.HostArch(), }