Commit 5fe960a9 authored by machenbach's avatar machenbach Committed by Commit bot

[android] Add toolchain path logic to gyp config.

BUG=chromium:502176
LOG=n
NOTRY=true

Review URL: https://codereview.chromium.org/1197703004

Cr-Commit-Position: refs/heads/master@{#29183}
parent 6c7449a6
...@@ -33,9 +33,39 @@ ...@@ -33,9 +33,39 @@
'variables': { 'variables': {
# Location of Android NDK. # Location of Android NDK.
'variables': { 'variables': {
'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', 'variables': {
'android_toolchain%': '<!(/bin/echo -n $ANDROID_TOOLCHAIN)', # The Android toolchain needs to use the absolute path to the NDK
# because it is used at different levels in the GYP files.
'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
'android_host_arch%': "<!(uname -m | sed -e 's/i[3456]86/x86/')",
'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
},
# Copy conditionally-set variables out one scope.
'android_ndk_root%': '<(android_ndk_root)',
'conditions': [
['target_arch == "ia32"', {
'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "x64"', {
'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch=="arm"', {
'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "arm64"', {
'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "mipsel"', {
'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "mips64el"', {
'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
],
}, },
'conditions': [ 'conditions': [
['android_ndk_root==""', { ['android_ndk_root==""', {
'variables': { 'variables': {
......
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
'conditions': [ 'conditions': [
['os_posix==1 and OS!="mac"', { ['os_posix==1 and OS!="mac"', {
'target_defaults': { 'target_defaults': {
'conditions': [ 'conditions': [
# Common options for AddressSanitizer, LeakSanitizer, # Common options for AddressSanitizer, LeakSanitizer,
# ThreadSanitizer and MemorySanitizer. # ThreadSanitizer and MemorySanitizer.
['asan==1 or lsan==1 or tsan==1 or msan==1', { ['asan==1 or lsan==1 or tsan==1 or msan==1', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment