release-request-a84b3435-75fa-41e8-bd3c-ca0f4cbd5cc5-for-git_oc-m2-release-4352002 snap-temp-L88700000105039240

Change-Id: Iff7dbbc4e2f59d0a8c9413bf146fcd6d02ccbacf
diff --git a/src/OpenGL/compiler/Android.mk b/src/OpenGL/compiler/Android.mk
index 95b3018..65f5033 100644
--- a/src/OpenGL/compiler/Android.mk
+++ b/src/OpenGL/compiler/Android.mk
@@ -72,6 +72,13 @@
 	ValidateLimitations.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)
 LOCAL_CLANG := true
 LOCAL_MODULE := swiftshader_compiler_release
@@ -85,6 +92,7 @@
 	-DANGLE_DISABLE_TRACE
 LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
 LOCAL_SHARED_LIBRARIES := libcutils
+LOCAL_HEADER_LIBRARIES := $(COMMON_HEADER_LIBRARIES)
 include $(BUILD_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -102,4 +110,5 @@
 
 LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
 LOCAL_SHARED_LIBRARIES := libcutils
+LOCAL_HEADER_LIBRARIES := $(COMMON_HEADER_LIBRARIES)
 include $(BUILD_STATIC_LIBRARY)