Commit 59818a2e authored by ulan@chromium.org's avatar ulan@chromium.org

Add option to build using a standalone Android toolchain without Android NDK.

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10908034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ddfae013
......@@ -34,6 +34,7 @@ TESTJOBS ?= -j16
GYPFLAGS ?=
TESTFLAGS ?=
ANDROID_NDK_ROOT ?=
ANDROID_TOOLCHAIN ?=
ANDROID_V8 ?= /data/local/v8
# Special build flags. Use them like this: "make library=shared"
......@@ -145,7 +146,7 @@ ENVFILE = $(OUTDIR)/environment
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
$(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
must-set-ANDROID_NDK_ROOT
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN
# Target definitions. "all" is the default.
all: $(MODES)
......@@ -182,7 +183,7 @@ native: $(OUTDIR)/Makefile.native
$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
must-set-ANDROID_NDK_ROOT Makefile.android
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
@$(MAKE) -f Makefile.android $@ \
ARCH="$(basename $@)" \
MODE="$(subst .,,$(suffix $@))" \
......@@ -252,9 +253,11 @@ $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
must-set-ANDROID_NDK_ROOT:
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
ifndef ANDROID_NDK_ROOT
$(error ANDROID_NDK_ROOT is not set)
ifndef ANDROID_TOOLCHAIN
$(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
endif
endif
# Replaces the old with the new environment file if they're different, which
......
......@@ -59,7 +59,7 @@ else
endif
TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt
ANDROID_TOOLCHAIN = ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}/bin
ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}/bin
ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),)
$(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}")
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment