From: Rob Herring Date: Fri, 12 May 2017 16:55:16 +0000 (-0500) Subject: Android: r600: fix build when LLVM is disabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de6f3cce8cdc5472d6a894fb2ed3840a76d1159e;p=mesa.git Android: r600: fix build when LLVM is disabled There's still an error after my recent clean-up if LLVM is not patched to enable AMDGPU target: external/mesa3d/src/amd/common/ac_llvm_util.c:38:2: error: implicit declaration of function 'LLVMInitializeAMDGPUTargetInfo' is invalid in C99 [-Werror,-Wimplicit-function-declaration] LLVMInitializeAMDGPUTargetInfo(); ^ external/mesa3d/src/amd/common/ac_llvm_util.c:39:2: error: implicit declaration of function 'LLVMInitializeAMDGPUTarget' is invalid in C99 [-Werror,-Wimplicit-function-declaration] LLVMInitializeAMDGPUTarget(); ^ external/mesa3d/src/amd/common/ac_llvm_util.c:40:2: error: implicit declaration of function 'LLVMInitializeAMDGPUTargetMC' is invalid in C99 [-Werror,-Wimplicit-function-declaration] LLVMInitializeAMDGPUTargetMC(); ^ external/mesa3d/src/amd/common/ac_llvm_util.c:41:2: error: implicit declaration of function 'LLVMInitializeAMDGPUAsmPrinter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] LLVMInitializeAMDGPUAsmPrinter(); ^ We need to drop libmesa_amd_common when LLVM is disabled, however there's still a dependency on include paths for ac_binary.h. So explicitly add the include path when LLVM is disabled. Signed-off-by: Rob Herring Acked-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk index 26c00f6ccd9..87f433dbaeb 100644 --- a/src/gallium/drivers/r600/Android.mk +++ b/src/gallium/drivers/r600/Android.mk @@ -30,7 +30,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES) +ifeq ($(MESA_ENABLE_LLVM),true) LOCAL_STATIC_LIBRARIES := libmesa_amd_common +else +LOCAL_C_INCLUDES += $(MESA_TOP)/src/amd/common +endif LOCAL_SHARED_LIBRARIES := libdrm_radeon LOCAL_MODULE := libmesa_pipe_r600