Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: build/android.gypi

Issue 1197703004: [android] Add toolchain path logic to gyp config. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/standalone.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android.gypi
diff --git a/build/android.gypi b/build/android.gypi
index 3468c2b461264993b93531950415274435b03964..104abdfcc81e549b592dde097b56682fe902c320 100644
--- a/build/android.gypi
+++ b/build/android.gypi
@@ -33,9 +33,39 @@
'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)',
+
+ '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': {
« no previous file with comments | « no previous file | build/standalone.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698