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 <iannucci@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/36/3886536/3
Wang Qing 2 years ago committed by LUCI CQ
parent 872ac9bd3d
commit 0648830632

@ -79,6 +79,9 @@ if [ -z $ARCH ]; then
riscv64)
ARCH=riscv64
;;
loongarch64)
ARCH=loong64
;;
*)
>&2 echo "UNKNOWN Machine architecture: ${UNAME}"
exit 1

@ -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()

@ -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(),
}

Loading…
Cancel
Save