瀏覽代碼

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>
Wang Qing 2 年之前
父節點
當前提交
0648830632
共有 3 個文件被更改,包括 6 次插入1 次删除
  1. 3 0
      cipd
  2. 2 0
      detect_host_arch.py
  3. 1 1
      gclient.py

+ 3 - 0
cipd

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

+ 2 - 0
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()

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