Reviewers: jochen, ulan,
Message:
PTAL. I'll remove the other side of the path logic from Makefile.android in
an
extra CL.
Description:
[android] Add toolchain path logic to gyp config.
BUG=chromium:502176
LOG=n
Please review this at https://codereview.chromium.org/1197703004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+36, -3 lines):
M build/android.gypi
M build/standalone.gypi
Index: build/android.gypi
diff --git a/build/android.gypi b/build/android.gypi
index
3468c2b461264993b93531950415274435b03964..f743f99df9b901f5434c00bddf2930c057154b54
100644
--- a/build/android.gypi
+++ b/build/android.gypi
@@ -33,9 +33,42 @@
'variables': {
# Location of Android NDK.
'variables': {
- 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
- 'android_toolchain%': '<!(/bin/echo -n $ANDROID_TOOLCHAIN)',
+ 'variables': {
+ # 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)',
+
+ # Android API level 16 is JB (Android 4.1) which is the minimum
+ # platform requirement for Chrome on Android, we use it for native
+ # code compilation.
+ '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': [
['android_ndk_root==""', {
'variables': {
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index
f8b5674c242fe5b83efa1bbb34cfb191b2e05e41..559f7ee79caafd940a208f7d5e398a51ab3a8cd4
100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -317,7 +317,7 @@
'conditions': [
['os_posix==1 and OS!="mac"', {
'target_defaults': {
- 'conditions': [
+ 'conditions': [
# Common options for AddressSanitizer, LeakSanitizer,
# ThreadSanitizer and MemorySanitizer.
['asan==1 or lsan==1 or tsan==1 or msan==1', {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.