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

Unified Diff: build/common.gypi

Issue 969383004: Use relative path to reference the libraries in the NDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 4fcd2117ffcf7a630d5e607cfdf6b41d850321e1..c94675bb56e1bff0fef7e1500292efb3fbf60956 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1671,11 +1671,16 @@
# Location of Android NDK.
'variables': {
'variables': {
- # Unfortunately we have to use absolute paths to the SDK/NDK because
- # they're passed to ant which uses a different relative path from
- # gyp.
- 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
+ # Standard libraries can use the relative path to the NDK.
+ 'android_ndk_root%': '../../third_party/android_tools/ndk/',
+ # Unfortunately, it is required to use the absolute path to the SDK
+ # because it us passed to ant which uses a different relative path
+ # from GYP.
'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
+ # Similarly, gdbserver and the Android toolchain need to use the
+ # absolute path to the NDK because they are used at different levels
+ # in the GYP files.
+ 'android_ndk_absolute_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
'android_host_arch%': '<!(uname -m)',
# Android API-level of the SDK used for compilation.
'android_sdk_version%': '21',
@@ -1684,6 +1689,7 @@
},
# Copy conditionally-set variables out one scope.
'android_ndk_root%': '<(android_ndk_root)',
+ 'android_ndk_absolute_root%': '<(android_ndk_absolute_root)',
'android_sdk_root%': '<(android_sdk_root)',
'android_sdk_version%': '<(android_sdk_version)',
'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
@@ -1699,17 +1705,17 @@
'conditions': [
['target_arch == "ia32"', {
'android_app_abi%': 'x86',
- 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
+ 'android_gdbserver%': '<(android_ndk_absolute_root)/prebuilt/android-x86/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
'android_ndk_lib_dir%': 'usr/lib',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_toolchain%': '<(android_ndk_absolute_root)/toolchains/x86-4.9/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%': '<(android_ndk_absolute_root)/prebuilt/android-x86_64/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-x86_64',
'android_ndk_lib_dir%': 'usr/lib64',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_toolchain%': '<(android_ndk_absolute_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch=="arm"', {
'conditions': [
@@ -1719,32 +1725,31 @@
'android_app_abi%': 'armeabi-v7a',
}],
],
- 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
+ 'android_gdbserver%': '<(android_ndk_absolute_root)/prebuilt/android-arm/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
'android_ndk_lib_dir%': 'usr/lib',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_toolchain%': '<(android_ndk_absolute_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "arm64"', {
'android_app_abi%': 'arm64-v8a',
- 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver',
+ 'android_gdbserver%': '<(android_ndk_absolute_root)/prebuilt/android-arm64/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-arm64',
'android_ndk_lib_dir%': 'usr/lib',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_toolchain%': '<(android_ndk_absolute_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "mipsel"', {
'android_app_abi%': 'mips',
- 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
+ 'android_gdbserver%': '<(android_ndk_absolute_root)/prebuilt/android-mips/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
'android_ndk_lib_dir%': 'usr/lib',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_toolchain%': '<(android_ndk_absolute_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "mips64el"', {
'android_app_abi%': 'mips64',
- 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64/gdbserver/gdbserver',
+ 'android_gdbserver%': '<(android_ndk_absolute_root)/prebuilt/android-mips64/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-mips64',
'android_ndk_lib_dir%': 'usr/lib64',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
- 'gcc_version%': 49,
Nico 2015/03/03 16:46:27 Is this no longer needed?
Fabrice (no longer in Chrome) 2015/03/03 16:54:21 This is from a time when we were using GCC 4.8 for
+ 'android_toolchain%': '<(android_ndk_absolute_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
],
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698