OSDN Git Service

Restrict building Subzero to Marshmallow and up.
authorNicolas Capens <capn@google.com>
Thu, 10 Aug 2017 20:57:25 +0000 (16:57 -0400)
committerNicolas Capens <nicolascapens@google.com>
Fri, 11 Aug 2017 16:38:28 +0000 (16:38 +0000)
Subzero requires full C++11 support, which isn't available on Android
versions prior to Marshmallow.

Change-Id: Icf09a51b525a1503f72441c969a9e364306096bd
Reviewed-on: https://swiftshader-review.googlesource.com/11488
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Android.mk
src/Android.mk

index b4d82e3..a89cdf0 100644 (file)
 # 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
index c067be6..7f1efa2 100644 (file)
@@ -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 \