diff options
author | rmcilroy@chromium.org <rmcilroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-20 18:35:49 +0000 |
---|---|---|
committer | rmcilroy@chromium.org <rmcilroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-20 18:35:49 +0000 |
commit | 7a2f984ad53eb52a0c865781ef85390a591f80e4 (patch) | |
tree | 4e109b243dcb35ee7e8dd223db8ef3ad7bb86d4a | |
parent | 33453f503b1e23c2f0b751ce9ee3cd4fb8af2a85 (diff) | |
download | chromium_src-7a2f984ad53eb52a0c865781ef85390a591f80e4.zip chromium_src-7a2f984ad53eb52a0c865781ef85390a591f80e4.tar.gz chromium_src-7a2f984ad53eb52a0c865781ef85390a591f80e4.tar.bz2 |
Enable Arm64 target arch in gyp build config
Initial support to get us started. There is a lot more work to do before we can compile for arm64.
BUG=354405
Review URL: https://codereview.chromium.org/199583008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258363 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/build_config.h | 2 | ||||
-rw-r--r-- | build/common.gypi | 31 | ||||
-rw-r--r-- | build/java_apk.gypi | 2 | ||||
-rw-r--r-- | components/nacl/nacl_defines.gypi | 6 | ||||
-rw-r--r-- | skia/skia.gyp | 6 | ||||
-rw-r--r-- | skia/skia_library_opts.gyp | 10 |
6 files changed, 44 insertions, 13 deletions
diff --git a/build/build_config.h b/build/build_config.h index 78d010d..d8f5dd6 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -107,7 +107,7 @@ #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 #define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(__arm64__) +#elif defined(__arm64__) || defined(__aarch64__) #define ARCH_CPU_ARM_FAMILY 1 #define ARCH_CPU_ARM64 1 #define ARCH_CPU_64_BITS 1 diff --git a/build/common.gypi b/build/common.gypi index b390c8d..75c80a1 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1330,7 +1330,7 @@ ['OS=="android"', { # We directly set the gcc_version since we know what we use. 'conditions': [ - ['target_arch=="x64"', { + ['target_arch=="x64" or target_arch=="arm64"', { 'gcc_version%': 48, }, { 'gcc_version%': 46, @@ -1460,13 +1460,15 @@ 'conditions': [ ['target_arch == "ia32"', { 'android_app_abi%': 'x86', + 'android_gdbserver_executable%': 'gdbserver', 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', }], ['target_arch == "x64"', { 'android_app_abi%': 'x86_64', - 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver', + 'android_gdbserver_executable%': 'gdbserver64', + 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver64', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-19/arch-x86_64', 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', }], @@ -1478,12 +1480,21 @@ 'android_app_abi%': 'armeabi-v7a', }], ], + 'android_gdbserver_executable%': 'gdbserver', 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', }], + ['target_arch == "arm64"', { + 'android_app_abi%': 'arm64', + 'android_gdbserver_executable%': 'gdbserver64', + 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver64/gdbserver64', + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-19/arch-arm64', + 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', + }], ['target_arch == "mipsel"', { 'android_app_abi%': 'mips', + 'android_gdbserver_executable%': 'gdbserver', 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', @@ -1492,6 +1503,7 @@ }, # Copy conditionally-set variables out one scope. 'android_app_abi%': '<(android_app_abi)', + 'android_gdbserver_executable': '<(android_gdbserver_executable)', 'android_gdbserver%': '<(android_gdbserver)', 'android_ndk_root%': '<(android_ndk_root)', 'android_ndk_sysroot': '<(android_ndk_sysroot)', @@ -3007,7 +3019,7 @@ }, }, 'conditions': [ - # TODO(jochen): Enable this on chromeos. http://crbug.com/353127 + # TODO(jochen): Enable this on chromeos. http://crbug.com/353127 ['os_posix==1 and chromeos==0', { 'target_defaults': { 'ldflags': [ @@ -3410,6 +3422,19 @@ }], ], }], + ['target_arch=="arm64"', { + 'target_conditions': [ + ['_toolset=="target"', { + 'conditions': [ + ['OS=="android"', { + 'cflags!': [ + '-fstack-protector', # stack protector is always enabled on arm64. + ], + }], + ], + }], + ], + }], ['target_arch=="mipsel"', { 'target_conditions': [ ['_toolset=="target"', { diff --git a/build/java_apk.gypi b/build/java_apk.gypi index cd8eeb4..4d39f1a 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -189,7 +189,7 @@ '<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)' ], 'package_input_paths': [ - '<(apk_package_native_libs_dir)/<(android_app_abi)/gdbserver', + '<(apk_package_native_libs_dir)/<(android_app_abi)/<(android_gdbserver_executable)', ], }, 'copies': [ diff --git a/components/nacl/nacl_defines.gypi b/components/nacl/nacl_defines.gypi index 31b81b7..fdcdf96 100644 --- a/components/nacl/nacl_defines.gypi +++ b/components/nacl/nacl_defines.gypi @@ -26,10 +26,10 @@ 'NACL_OSX=1', ], }], - # "disabled_nacl" is always set to "1" when building for "ios", so - # set "nacl_defines" to the empty list to ensure the variable is + # "disabled_nacl" is always set to "1" when building for "ios" or android, + # so set "nacl_defines" to the empty list to ensure the variable is # always defined. - ['OS=="ios"', { + ['OS=="ios" or OS=="android"', { 'nacl_defines': [ ], }], diff --git a/skia/skia.gyp b/skia/skia.gyp index 4a5d62e..4c4f6f8 100644 --- a/skia/skia.gyp +++ b/skia/skia.gyp @@ -99,12 +99,14 @@ ], 'conditions': [ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ - target_arch != "arm" and target_arch != "mipsel"', { + target_arch != "arm" and target_arch != "mipsel" and \ + target_arch != "arm64"', { 'cflags': [ '-msse2', ], }], - [ 'target_arch != "arm" and target_arch != "mipsel"', { + [ 'target_arch != "arm" and target_arch != "mipsel" and \ + target_arch != "arm64"', { 'sources': [ 'ext/convolver_SSE2.cc', ], diff --git a/skia/skia_library_opts.gyp b/skia/skia_library_opts.gyp index 3e2a4f8..f463c76 100644 --- a/skia/skia_library_opts.gyp +++ b/skia/skia_library_opts.gyp @@ -38,12 +38,14 @@ ], 'conditions': [ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ - target_arch != "arm" and target_arch != "mipsel"', { + target_arch != "arm" and target_arch != "arm64" and \ + target_arch != "mipsel"', { 'cflags': [ '-msse2', ], }], - [ 'target_arch != "arm" and target_arch != "mipsel"', { + [ 'target_arch != "arm" and target_arch != "mipsel" and \ + target_arch != "arm64"', { 'sources': [ '../third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp', '../third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp', @@ -58,6 +60,7 @@ 'skia_opts_ssse3', ], }], + # TODO(rmcilroy): Add neon support for arm64 - http://crbug.com/354405 [ 'target_arch == "arm"', { 'conditions': [ [ 'arm_version >= 7 and arm_neon == 1', { @@ -177,7 +180,8 @@ ], }, }], - [ 'target_arch != "arm" and target_arch != "mipsel"', { + [ 'target_arch != "arm" and target_arch != "arm64" and \ + target_arch != "mipsel"', { 'sources': [ '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp', ], |