diff --git a/Android.mk b/Android.mk index b4d82e3dbd1..a89cdf08621 100644 --- a/Android.mk +++ b/Android.mk @@ -14,8 +14,22 @@ # limitations under the License. # -LOCAL_PATH:= $(call my-dir) +LOCAL_PATH := $(call my-dir) +# Use Subzero as the Reactor JIT back-end on ARM, else LLVM. +ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm)) +use_subzero := true +endif + +# Subzero requires full C++11 support, which is available from Marshmallow and up. +ifdef use_subzero +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23 && echo PreMarshmallow),PreMarshmallow) +unsupported_build := true +endif +endif + +ifndef unsupported_build ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 arm)) include $(call all-makefiles-under,$(LOCAL_PATH)) endif +endif \ No newline at end of file diff --git a/src/Android.mk b/src/Android.mk index c067be66b62..7f1efa2d7e6 100644 --- a/src/Android.mk +++ b/src/Android.mk @@ -1,10 +1,5 @@ LOCAL_PATH:= $(call my-dir) -# Use Subzero as the Reactor JIT back-end on ARM, else LLVM. -ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm)) -use_subzero := true -endif - COMMON_C_INCLUDES += \ bionic \ $(LOCAL_PATH)/../include \