From eb16162e00c0e05a311aef0db7037a0ca372b85b Mon Sep 17 00:00:00 2001 From: Rebecca Chang Swee Fun Date: Wed, 8 Jun 2022 20:05:03 +0000 Subject: [PATCH] Add riscv64 architecture detection Signed-off-by: Rebecca Chang Swee Fun Bug: 1331190 Change-Id: I7c751e5cf02f088f2145c3c701547f0412f2bd69 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3686858 Reviewed-by: Gavin Mak Reviewed-by: Robbie Iannucci Commit-Queue: Robbie Iannucci --- cipd | 3 +++ detect_host_arch.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cipd b/cipd index 8bdbf77cb6..3ea061910b 100755 --- a/cipd +++ b/cipd @@ -72,6 +72,9 @@ if [ -z $ARCH ]; then ARCH+=le fi ;; + riscv64) + ARCH=riscv64 + ;; *) >&2 echo "UNKNOWN Machine architecture: ${UNAME}" exit 1 diff --git a/detect_host_arch.py b/detect_host_arch.py index 0843d642a5..56e6e6a383 100755 --- a/detect_host_arch.py +++ b/detect_host_arch.py @@ -33,6 +33,8 @@ def HostArch(): host_arch = 'ppc' elif host_arch.startswith('s390'): host_arch = 's390' + elif host_arch.startswith('riscv'): + host_arch = 'riscv64' # platform.machine is based on running kernel. It's possible to use 64-bit