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

Unified Diff: build/android/envsetup.sh

Issue 10198027: enable android x86 build (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: add TODO for adjust chromium/android target_arch naming scheme Created 8 years, 8 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 | « base/base.gypi ('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.sh
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh
index fdf328e51b7a655c8e1355d2737aec7304e661a8..77faec8605cb4947d60f323f66974037c16c62ae 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -45,7 +45,25 @@ case "${host_os}" in
return 1
esac
-export ANDROID_TOOLCHAIN="${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/${toolchain_dir}/bin/"
+# The following defines will affect ARM code generation of both C/C++ compiler
+# and V8 mksnapshot.
+case "${TARGET_PRODUCT-full}" in
+ "full")
+ DEFINES=" target_arch=arm"
+ DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16"
+ toolchain_arch="arm-linux-androideabi-4.4.3"
+ ;;
+ *x86*)
+ DEFINES=" target_arch=ia32 use_libffmpeg=0"
+ toolchain_arch="x86-4.4.3"
+ ;;
+ *)
+ echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2
+ return 1
+esac
+
+toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}/prebuilt/"
+export ANDROID_TOOLCHAIN="${toolchain_path}/${toolchain_dir}/bin/"
export ANDROID_SDK_VERSION="15"
@@ -97,7 +115,7 @@ export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip)
# The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories
# to canonicalize them (remove double '/', remove trailing '/', etc).
-DEFINES="OS=android"
+DEFINES+=" OS=android"
DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted.
DEFINES+=" host_os=${host_os}"
DEFINES+=" linux_fpic=1"
@@ -113,26 +131,6 @@ DEFINES+=" build_ffmpegsumo=0"
DEFINES+=" gtest_target_type=executable"
DEFINES+=" branding=Chromium"
-# If the TARGET_PRODUCT wasn't set, use 'full' by default.
-if [ -z "${TARGET_PRODUCT}" ]; then
- TARGET_PRODUCT="full"
-fi
-
-# The following defines will affect ARM code generation of both C/C++ compiler
-# and V8 mksnapshot.
-case "${TARGET_PRODUCT}" in
- "full")
- DEFINES+=" target_arch=arm"
- DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16"
- ;;
- *x86*)
- DEFINES+=" target_arch=ia32 use_libffmpeg=0"
- ;;
- *)
- echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2
- return 1
-esac
-
export GYP_DEFINES="${DEFINES}"
# Use the "android" flavor of the Makefile generator for both Linux and OS X.
« no previous file with comments | « base/base.gypi ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698