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

Unified Diff: build/android/envsetup_functions.sh

Issue 10837226: Use NDK r8b and 64-bit toolchain (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 8 years, 4 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 | « build/android/envsetup.sh ('k') | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/envsetup_functions.sh
diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh
index bf8ca0c49c84177a71e6c2ac2b759dfb34406163..e7ed8f27f97b2c5cb6264088cbbf83c74be72e93 100755
--- a/build/android/envsetup_functions.sh
+++ b/build/android/envsetup_functions.sh
@@ -27,13 +27,15 @@ common_check_toolchain() {
common_vars_defines() {
# Set toolchain path according to product architecture.
- toolchain_arch="arm"
+ toolchain_arch="arm-linux-androideabi"
if [[ "${TARGET_PRODUCT}" =~ .*x86.* ]]; then
toolchain_arch="x86"
+ toolchain_dir="linux-x86"
fi
+ toolchain_version="4.6"
toolchain_target=$(basename \
- ${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}-*)
+ ${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}-${toolchain_version})
toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_target}"\
"/prebuilt/${toolchain_dir}/bin/"
@@ -207,7 +209,6 @@ sdk_build_init() {
}
-
################################################################################
# Initializes environment variables for build with android source. This expects
# android environment to be set up along with lunch. To build:
@@ -221,8 +222,14 @@ non_sdk_build_init() {
# having to cd to $ANDROID_BUILD_TOP.
export TOP="$ANDROID_BUILD_TOP"
- # We export "ANDROID_NDK_ROOT" for building Chromium for Android by NDK.
- export ANDROID_NDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/ndk/android-ndk-r7
+ # Set "ANDROID_NDK_ROOT" as checked-in version, if it was not set.
+ if [ ! -d "$ANDROID_NDK_ROOT" ] ; then
+ export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/"
+ fi
+ if [ ! -d "$ANDROID_NDK_ROOT" ] ; then
+ echo "Can not find Android NDK root ${ANDROID_NDK_ROOT}." >& 2
+ return 1
+ fi
# We export "ANDROID_SDK_ROOT" for building Java source with the SDK.
export ANDROID_SDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/sdk/\
@@ -230,6 +237,10 @@ ${ANDROID_SDK_VERSION}
# Needed by android antfiles when creating apks.
export ANDROID_SDK_HOME=${ANDROID_SDK_ROOT}
+ # Unset ANDROID_TOOLCHAIN, so it could be set to checked-in 64-bit toolchain.
+ # in common_vars_defines
+ unset ANDROID_TOOLCHAIN
+
common_vars_defines
DEFINES+=" sdk_build=0"
« no previous file with comments | « build/android/envsetup.sh ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698