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 ...@@ -34,6 +34,7 @@ TESTJOBS ?= -j16
GYPFLAGS ?= GYPFLAGS ?=
TESTFLAGS ?= TESTFLAGS ?=
ANDROID_NDK_ROOT ?= ANDROID_NDK_ROOT ?=
ANDROID_TOOLCHAIN ?=
ANDROID_V8 ?= /data/local/v8 ANDROID_V8 ?= /data/local/v8
# Special build flags. Use them like this: "make library=shared" # Special build flags. Use them like this: "make library=shared"
...@@ -145,7 +146,7 @@ ENVFILE = $(OUTDIR)/environment ...@@ -145,7 +146,7 @@ ENVFILE = $(OUTDIR)/environment
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
$(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
must-set-ANDROID_NDK_ROOT must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN
# Target definitions. "all" is the default. # Target definitions. "all" is the default.
all: $(MODES) all: $(MODES)
...@@ -182,7 +183,7 @@ native: $(OUTDIR)/Makefile.native ...@@ -182,7 +183,7 @@ native: $(OUTDIR)/Makefile.native
$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ $(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 $@ \ @$(MAKE) -f Makefile.android $@ \
ARCH="$(basename $@)" \ ARCH="$(basename $@)" \
MODE="$(subst .,,$(suffix $@))" \ MODE="$(subst .,,$(suffix $@))" \
...@@ -252,9 +253,11 @@ $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) ...@@ -252,9 +253,11 @@ $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
must-set-ANDROID_NDK_ROOT: must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
ifndef ANDROID_NDK_ROOT 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 endif
# Replaces the old with the new environment file if they're different, which # Replaces the old with the new environment file if they're different, which
......
...@@ -59,7 +59,7 @@ else ...@@ -59,7 +59,7 @@ else
endif endif
TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt 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)),) ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),)
$(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}") $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}")
endif 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