Commit d4b2dd49 by Jiyong Park Committed by Nicolas Capens

Build SwiftShader with BOARD_VNDK_VERSION=current

This is using cutils/log.h which is deprecated in O (in favor of log/log.h) and this is causing build error when building with BOARD_VNDK_VERSION=current set. However, since SwiftShader should be able to be built with older versions Android some of which don't have log/log.h, we can't simply change cutils/log.h to log/log.h. Instead, liblog_headers is added to the header lib dependency (only for O and beyond) so that log/log.h can be correctly included via cutils/log.h Bug b/63135587 Change-Id: I763250e7410025b1dcd7ae210693e3d6bffdb6f1 Reviewed-on: https://swiftshader-review.googlesource.com/17629Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 91beb8d4
...@@ -72,6 +72,13 @@ COMMON_SRC_FILES := \ ...@@ -72,6 +72,13 @@ COMMON_SRC_FILES := \
ValidateLimitations.cpp \ ValidateLimitations.cpp \
ValidateSwitch.cpp \ ValidateSwitch.cpp \
# liblog_headers is introduced from O
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo O),O)
COMMON_HEADER_LIBRARIES := liblog_headers
else
COMMON_HEADER_LIBRARIES :=
endif
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_CLANG := true LOCAL_CLANG := true
LOCAL_MODULE := swiftshader_compiler_release LOCAL_MODULE := swiftshader_compiler_release
...@@ -85,6 +92,7 @@ LOCAL_CFLAGS += \ ...@@ -85,6 +92,7 @@ LOCAL_CFLAGS += \
-DANGLE_DISABLE_TRACE -DANGLE_DISABLE_TRACE
LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES) LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
LOCAL_SHARED_LIBRARIES := libcutils LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_HEADER_LIBRARIES := $(COMMON_HEADER_LIBRARIES)
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
...@@ -102,4 +110,5 @@ LOCAL_CFLAGS += \ ...@@ -102,4 +110,5 @@ LOCAL_CFLAGS += \
LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES) LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
LOCAL_SHARED_LIBRARIES := libcutils LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_HEADER_LIBRARIES := $(COMMON_HEADER_LIBRARIES)
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
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