android: fix llvm, elf dependencies for M, N releases
authorMauro Rossi <issor.oruam@gmail.com>
Mon, 30 Jan 2017 19:57:30 +0000 (20:57 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Feb 2017 23:01:35 +0000 (23:01 +0000)
These changes set the correct llvm version and elf include path
which differ for Marshmallow and Nougat

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Android.common.mk
src/amd/Android.common.mk
src/gallium/Android.common.mk

index 4fa02ae05214708e44f9ced99afa0d525519dd99..b03876d6269a845eb865ae0d5d9e934ca9d8dbc8 100644 (file)
@@ -81,8 +81,18 @@ endif
 endif
 
 ifeq ($(MESA_ENABLE_LLVM),true)
-LOCAL_CFLAGS += \
-       -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2
+  ifeq ($(MESA_ANDROID_MAJOR_VERSION),5)
+    LOCAL_CFLAGS += -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2
+    ELF_INCLUDES := external/elfutils/0.153/libelf
+  endif
+  ifeq ($(MESA_ANDROID_MAJOR_VERSION),6)
+    LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0
+    ELF_INCLUDES := external/elfutils/src/libelf
+  endif
+  ifeq ($(MESA_ANDROID_MAJOR_VERSION),7)
+    LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0
+    ELF_INCLUDES := external/elfutils/libelf
+  endif
 endif
 
 ifneq ($(LOCAL_IS_HOST_MODULE),true)
index dfa7e59e9a2cfe1ccb646cc39cbbadf77e010a18..faace71e952f2ecbe7a8328e47cdacd90f814cdf 100644 (file)
@@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \
        external/llvm/include \
        external/llvm/device/include \
        external/libcxx/include \
-       external/elfutils/$(if $(filter 5,$(MESA_ANDROID_MAJOR_VERSION)),0.153/,$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)),src/))libelf
+       $(ELF_INCLUDES)
 
 LOCAL_STATIC_LIBRARIES := libLLVMCore
 
index 7c6c7ac68202e2704b51883735d16a7978a0b3d7..8559b5bce794d95ce789a29edc80c3ff232a92c6 100644 (file)
@@ -34,7 +34,7 @@ LOCAL_C_INCLUDES += \
        external/llvm/include \
        external/llvm/device/include \
        external/libcxx/include \
-       external/elfutils/$(if $(filter true,$(MESA_LOLLIPOP_BUILD)),0.153/)libelf
+       $(ELF_INCLUDES)
 endif
 
 include $(MESA_COMMON_MK)