Android: Add LLVM support for Android O
authorRob Herring <robh@kernel.org>
Wed, 3 May 2017 19:35:25 +0000 (14:35 -0500)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 11 May 2017 12:52:21 +0000 (13:52 +0100)
Android O moves to LLVM 3.9 and also has some differences in header
dependencies as LLVM has moved to blueprint files. It seems libLLVMCore
was only needed for header dependencies, so we can drop that for O.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Android.mk

index 600b37a52e62fa455e389f51e8297142a04891b3..ab6bf6adbd4868565e6369edf3ab35ccd1373e66 100644 (file)
@@ -92,7 +92,10 @@ define mesa-build-with-llvm
   $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
     $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0) \
     $(eval LOCAL_STATIC_LIBRARIES += libLLVMCore) \
-    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include),)
+    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include),) \
+  $(if $(filter O,$(MESA_ANDROID_MAJOR_VERSION)), \
+    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0) \
+    $(eval LOCAL_HEADER_LIBRARIES += llvm-headers),)
 endef
 
 # add subdirectories