android: restore llvm includes

Submitted by Mauro Rossi on Aug. 21, 2017, 9:49 p.m.

Details

Message ID 20170821214902.6455-1-issor.oruam@gmail.com
State New
Headers show
Series "android: restore llvm includes" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Mauro Rossi Aug. 21, 2017, 9:49 p.m.
Fixes the following building errors:

In file included from external/mesa/src/amd/common/ac_shader_info.c:25:
In file included from external/mesa/src/amd/common/ac_nir_to_llvm.h:29:
In file included from external/llvm/include/llvm-c/TargetMachine.h:23:
external/llvm/include/llvm-c/Target.h:23:10: fatal error: 'llvm/Config/llvm-config.h' file not found
#include "llvm/Config/llvm-config.h"
         ^
1 error generated.


In file included from external/mesa/src/amd/common/ac_llvm_helper.cpp:32:
In file included from external/mesa/src/amd/common/ac_llvm_util.h:30:
In file included from external/llvm/include/llvm-c/TargetMachine.h:23:
external/llvm/include/llvm-c/Target.h:23:10: fatal error: 'llvm/Config/llvm-config.h' file not found
#include "llvm/Config/llvm-config.h"
         ^
1 error generated.

Fixes: 4734bfc02a "Android: Fix LLVM duplicated symbols linking for N and M"

Cc: Rob Herring <robh@kernel.org>
Cc: Qiang Yu <Qiang.Yu@amd.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: 17.2 <mesa-stable@lists.freedesktop.org>
---
 Android.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/Android.mk b/Android.mk
index c1a664b2b4..d818399a9f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -88,11 +88,14 @@  define mesa-build-with-llvm
   $(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5), \
     $(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \
   $(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \
-    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0)) \
+    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0) \
+    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include)) \
   $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
-    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0)) \
+    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0) \
+    $(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_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0) \
+    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include)) \
   $(eval LOCAL_SHARED_LIBRARIES += libLLVM)
 endef
 

Comments

This one is not needed, I was testing with missing pieces in
external/llvm on my side
Sorry for the noise

Mauro

2017-08-21 23:49 GMT+02:00 Mauro Rossi <issor.oruam@gmail.com>:
> Fixes the following building errors:
>
> In file included from external/mesa/src/amd/common/ac_shader_info.c:25:
> In file included from external/mesa/src/amd/common/ac_nir_to_llvm.h:29:
> In file included from external/llvm/include/llvm-c/TargetMachine.h:23:
> external/llvm/include/llvm-c/Target.h:23:10: fatal error: 'llvm/Config/llvm-config.h' file not found
> #include "llvm/Config/llvm-config.h"
>          ^
> 1 error generated.
>
>
> In file included from external/mesa/src/amd/common/ac_llvm_helper.cpp:32:
> In file included from external/mesa/src/amd/common/ac_llvm_util.h:30:
> In file included from external/llvm/include/llvm-c/TargetMachine.h:23:
> external/llvm/include/llvm-c/Target.h:23:10: fatal error: 'llvm/Config/llvm-config.h' file not found
> #include "llvm/Config/llvm-config.h"
>          ^
> 1 error generated.
>
> Fixes: 4734bfc02a "Android: Fix LLVM duplicated symbols linking for N and M"
>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Qiang Yu <Qiang.Yu@amd.com>
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> Cc: 17.2 <mesa-stable@lists.freedesktop.org>
> ---
>  Android.mk | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/Android.mk b/Android.mk
> index c1a664b2b4..d818399a9f 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -88,11 +88,14 @@ define mesa-build-with-llvm
>    $(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5), \
>      $(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \
>    $(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \
> -    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0)) \
> +    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0) \
> +    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include)) \
>    $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
> -    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0)) \
> +    $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0) \
> +    $(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_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0) \
> +    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include)) \
>    $(eval LOCAL_SHARED_LIBRARIES += libLLVM)
>  endef
>
> --
> 2.11.0
>