[Mesa-dev] [PATCH] Android: fix radeonsi building errors on Android O

Chih-Wei Huang cwhuang at android-x86.org
Tue Sep 5 09:16:37 UTC 2017


The radeonsi driver fails in the error:

[  5% 200/3583] target  C++: libmesa_amd_common_32 <= external/mesa/src/amd/common/ac_llvm_helper.cpp
In file included from external/mesa/src/amd/common/ac_llvm_helper.cpp:35:
In file included from external/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:22:
In file included from external/llvm/include/llvm/IR/Module.h:21:
In file included from external/llvm/include/llvm/IR/Function.h:22:
In file included from external/llvm/include/llvm/IR/Argument.h:19:
external/llvm/include/llvm/IR/Attributes.h:71:14: fatal error: 'llvm/IR/Attributes.inc' file not found
    #include "llvm/IR/Attributes.inc"
             ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

The reason is llvm-headers is still necessary to build radeonsi driver.
However, it's accidentally(?) removed in commit 4734bfc0.

Fixes: 4734bfc0 ("Android: Fix LLVM duplicated symbols linking for N and M")

Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
 Android.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Android.mk b/Android.mk
index e03eb71..4ab6725 100644
--- a/Android.mk
+++ b/Android.mk
@@ -96,6 +96,7 @@ define mesa-build-with-llvm
   $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
     $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0)) \
   $(if $(filter 8,$(MESA_ANDROID_MAJOR_VERSION)), \
+    $(eval LOCAL_HEADER_LIBRARIES += llvm-headers) \
     $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0)) \
   $(eval LOCAL_SHARED_LIBRARIES += libLLVM)
 endef
-- 
1.9.1



More information about the mesa-dev mailing list