diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-20 17:00:53 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-20 19:33:11 -0700 |
commit | cbb7ff9b83266e4b88095243792cd95d720515b7 (patch) | |
tree | 9c50aeb30c6d5a60ac305468c97818756359f2c8 | |
parent | f2bac284f36f66ec9a5a8816c10ba2663b2ae1a5 (diff) | |
download | ndk-cbb7ff9b83266e4b88095243792cd95d720515b7.tar.gz |
Add APP_ABI=all32 and APP_ABI=all64
APP_ABI=all32 is equivalent to APP_ABI=armeabi,armeabi-v7a,x86,mips
APP_ABI=all64 is equivalent to APP_ABI=arm64-v8a,x86_64,mips64
APP_ABI=all selects all ABIs
Extend _NDK_TESTING_ALL_ for testing purpose:
1. _NDK_TESTING_ALL_=yes or all place armeabi-v7a-hard binaries in its own
lib/armeabi-v7a-hard directory instead of lib/armeabi-v7a
2. _NDK_TESTING_ALL_=all32 does the above (1.), and expand all as if it's all32
3. _NDK_TESTING_ALL_=all32 does 1. (doesn't matter, though), and expand all as if it's all64
Change-Id: I8de57888d5855dccb7ecebef0e94f0446f3290e9
-rw-r--r-- | build/core/init.mk | 15 | ||||
-rw-r--r-- | build/core/setup-app.mk | 8 | ||||
-rw-r--r-- | build/core/setup-toolchain.mk | 5 | ||||
-rwxr-xr-x | tests/run-tests.sh | 5 |
4 files changed, 29 insertions, 4 deletions
diff --git a/build/core/init.mk b/build/core/init.mk index 894d68032..ee3eee5b7 100644 --- a/build/core/init.mk +++ b/build/core/init.mk @@ -534,11 +534,24 @@ _archs := $(sort $(strip $(notdir $(wildcard $(NDK_PLATFORMS_ROOT)/android-*/arc NDK_FOUND_ARCHS := $(_archs:arch-%=%) # the list of abis 'APP_ABI=all' is expanded to -ifeq ($(_NDK_TESTING_ALL_),yes) +ifneq (,$(filter yes all all32 all64,$(_NDK_TESTING_ALL_))) NDK_APP_ABI_ALL_EXPANDED := $(NDK_KNOWN_ABIS) +NDK_APP_ABI_ALL32_EXPANDED := $(NDK_KNOWN_ABI32S) else NDK_APP_ABI_ALL_EXPANDED := $(NDK_KNOWN_DEVICE_ABIS) +NDK_APP_ABI_ALL32_EXPANDED := $(NDK_KNOWN_DEVICE_ABI32S) endif +NDK_APP_ABI_ALL64_EXPANDED := $(NDK_KNOWN_DEVICE_ABI64S) + +# For testing purpose +ifeq ($(_NDK_TESTING_ALL_),all32) +NDK_APP_ABI_ALL_EXPANDED := $(NDK_APP_ABI_ALL32_EXPANDED) +else +ifeq ($(_NDK_TESTING_ALL_),all64) +NDK_APP_ABI_ALL_EXPANDED := $(NDK_APP_ABI_ALL64_EXPANDED) +endif +endif + # The first API level ndk-build enforces -fPIE for executable NDK_PIE_PLATFORM_LEVEL := 16 diff --git a/build/core/setup-app.mk b/build/core/setup-app.mk index 9fc1b33e7..8e956f4bf 100644 --- a/build/core/setup-app.mk +++ b/build/core/setup-app.mk @@ -60,6 +60,12 @@ endif ifeq ($(NDK_APP_ABI),all) NDK_APP_ABI := $(NDK_APP_ABI_ALL_EXPANDED) else +ifeq ($(NDK_APP_ABI),all32) + NDK_APP_ABI := $(NDK_APP_ABI_ALL32_EXPANDED) +else +ifeq ($(NDK_APP_ABI),all64) + NDK_APP_ABI := $(NDK_APP_ABI_ALL64_EXPANDED) +else # Plug in the unknown _unknown_abis := $(strip $(filter-out $(NDK_ALL_ABIS),$(NDK_APP_ABI))) ifneq ($(_unknown_abis),) @@ -91,6 +97,8 @@ else $(call __ndk_error,Aborting) endif endif +endif +endif # Clear all installed binaries for this application # This ensures that if the build fails, you're not going to mistakenly diff --git a/build/core/setup-toolchain.mk b/build/core/setup-toolchain.mk index 530ca85b6..bf77c984b 100644 --- a/build/core/setup-toolchain.mk +++ b/build/core/setup-toolchain.mk @@ -136,8 +136,9 @@ TARGET_GDBSERVER := $(NDK_ROOT)/prebuilt/android-$(TARGET_ARCH)/gdbserver/gdbser # compute NDK_APP_DST_DIR as the destination directory for the generated files NDK_APP_DST_DIR := $(NDK_APP_LIBS_OUT)/$(TARGET_ARCH_ABI) -# install armeabi-v7a-hard to lib/armeabi-v7a, unless under testing where env. var. _NDK_TESTING_ALL_=yes -ifneq ($(_NDK_TESTING_ALL_),yes) +# install armeabi-v7a-hard to lib/armeabi-v7a, unless under testing where env. var. _NDK_TESTING_ALL_ +# is set to one of yes, all, all32, or all64 +ifeq (,$(filter yes all all32 all64,$(_NDK_TESTING_ALL_))) ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard) NDK_APP_DST_DIR := $(NDK_APP_LIBS_OUT)/armeabi-v7a endif diff --git a/tests/run-tests.sh b/tests/run-tests.sh index afa80094d..dbe81f884 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -36,7 +36,10 @@ NDK_BUILDTOOLS_PATH=$ROOTDIR/build/tools # directoy and tested separately from armeabi-v7a. Some tests are now compiled with both # APP_ABI=armeabi-v7a and APP_ABI=armeabi-v7a-hard. Without _NDK_TESTING_ALL_=yes, tests # may fail to install due to race condition on the same libs/armeabi-v7a -export _NDK_TESTING_ALL_=yes +if [ -z "$_NDK_TESTING_ALL_" ]; then + _NDK_TESTING_ALL_=all +fi +export _NDK_TESTING_ALL_ # The list of tests that are too long to be part of a normal run of # run-tests.sh. Most of these do not run properly at the moment. |