Browse Source

Add arm64 build support

HAMIDx9 7 years ago
parent
commit
cd42133651

+ 10 - 0
script/cibuild

@@ -34,6 +34,14 @@ LINUX_DEPS_ARM = [
    'gcc-4.8-multilib-arm-linux-gnueabihf',
 ]
 
+LINUX_DEPS_ARM64 = [
+   'binutils-aarch64-linux-gnu',
+   'libc6-dev-arm64-cross',
+   'linux-libc-dev-arm64-cross',
+   'g++-4.8-aarch64-linux-gnu',
+   'gcc-4.8-aarch64-linux-gnu',
+   'gcc-aarch64-linux-gnu',
+]
 
 def main():
   os.environ['CI'] = '1'
@@ -56,6 +64,8 @@ def main():
     deps = LINUX_DEPS
     if target_arch == 'arm':
       deps += LINUX_DEPS_ARM
+    elif target_arch == 'arm64':
+      deps += LINUX_DEPS_ARM64
     else:
       deps += LINUX_DEPS_NO_ARM
     execute(['sudo', 'apt-get', 'install'] + deps)

+ 5 - 0
script/cibuild-electron-linux-arm64

@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+export TARGET_ARCH=arm64
+
+script/cibuild-linux

+ 2 - 0
script/create-dist.py

@@ -208,6 +208,8 @@ def strip_binaries():
 def strip_binary(binary_path):
     if get_target_arch() == 'arm':
       strip = 'arm-linux-gnueabihf-strip'
+    elif get_target_arch() == 'arm64':
+      strip = 'aarch64-linux-gnu-strip'
     else:
       strip = 'strip'
     execute([strip, binary_path])

+ 18 - 1
toolchain.gypi

@@ -140,7 +140,7 @@
     }],
 
     # Setup sysroot environment.
-    ['OS=="linux" and target_arch in ["arm", "ia32", "x64"]', {
+    ['OS=="linux" and target_arch in ["arm", "ia32", "x64", "arm64"]', {
       'target_defaults': {
         'target_conditions': [
           ['_toolset=="target"', {
@@ -259,6 +259,23 @@
                 ],
               }],
             ],
+          }],  # target_arch=="arm64" and _toolset=="target"
+          ['target_arch=="arm64" and _toolset=="target"', {
+            'conditions': [
+              ['clang==0', {
+                'cflags_cc': [
+                  '-Wno-abi',
+                ],
+              }],
+              ['clang==1 and arm_arch!=""', {
+                'cflags': [
+                  '-target  aarch64-linux-gnu',
+                ],
+                'ldflags': [
+                  '-target  aarch64-linux-gnu',
+                ],
+              }],
+            ],
           }],  # target_arch=="arm" and _toolset=="target"
         ],
       },

File diff suppressed because it is too large
+ 602 - 130
vendor/third_party/lss/linux_syscall_support.h


Some files were not shown because too many files changed in this diff