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

Unified Diff: tools/android-build.sh

Issue 10795045: Enable building V8 for Android on Mac (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 5 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/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android-build.sh
===================================================================
--- tools/android-build.sh (revision 12162)
+++ tools/android-build.sh (working copy)
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if [ ${#@} -lt 4 ] ; then
- echo "Error: $0 needs 4 arguments."
+ echo "$0: Error: needs 4 arguments."
exit 1
fi
@@ -42,8 +42,11 @@
"linux")
toolchain_dir="linux-x86"
;;
+ "mac")
+ toolchain_dir="darwin-x86"
+ ;;
*)
- echo "Host platform ${host_os} is not supported" >& 2
+ echo "$0: Host platform ${host_os} is not supported" >& 2
exit 1
esac
@@ -58,23 +61,27 @@
toolchain_arch="x86-4.4.3"
;;
*)
- echo "Architecture: ${ARCH} is not supported." >& 2
- echo "Current supported architectures: arm|ia32." >& 2
+ echo "$0: Target architecture ${ARCH} is not supported." >& 2
+ echo "$0: Current supported architectures: android_arm|android_ia32." >& 2
exit 1
esac
toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}/prebuilt/"
ANDROID_TOOLCHAIN="${toolchain_path}/${toolchain_dir}/bin"
if [ ! -d "${ANDROID_TOOLCHAIN}" ]; then
- echo "Cannot find Android toolchain in ${ANDROID_TOOLCHAIN}." >& 2
- echo "The NDK version might be wrong." >& 2
+ echo "$0: Cannot find Android toolchain in ${ANDROID_TOOLCHAIN}." >& 2
+ echo "$0: The NDK version might be wrong." >& 2
exit 1
fi
-# The set of GYP_DEFINES to pass to gyp.
+# For mksnapshot host generation.
+DEFINES+=" host_os=${host_os}"
+
+# The set of GYP_DEFINES to pass to gyp.
export GYP_DEFINES="${DEFINES}"
-export GYP_GENERATORS=make
+# Use the "android" flavor of the Makefile generator for both Linux and OS X.
+export GYP_GENERATORS=make-android
export CC=${ANDROID_TOOLCHAIN}/*-gcc
export CXX=${ANDROID_TOOLCHAIN}/*-g++
build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
@@ -85,6 +92,6 @@
export RANLIB=${ANDROID_TOOLCHAIN}/*-ranlib
export LD=${ANDROID_TOOLCHAIN}/*-ld
export LINK=${ANDROID_TOOLCHAIN}/*-g++
-export BUILDTYPE=${MODE[@]^}
-export builddir=$(readlink -f ${PWD})/${OUTDIR}/${ARCH}.${MODE}
+export BUILDTYPE=$(echo ${MODE} | python -c "print raw_input().capitalize()")
+export builddir=${PWD}/${OUTDIR}/${ARCH}.${MODE}
make -C "${OUTDIR}" -f Makefile.${ARCH}
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698