Skip to content

Commit

Permalink
Restrict building Subzero to Marshmallow and up.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
c0d1f1ed committed Aug 11, 2017
1 parent 5bf72ee commit 352e56c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
16 changes: 15 additions & 1 deletion Android.mk
Expand Up @@ -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
5 changes: 0 additions & 5 deletions 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 \
Expand Down

0 comments on commit 352e56c

Please sign in to comment.