OSDN Git Service

android: conditionally add LLVM_TARGET(AMDGPU) in device configs
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 10 Nov 2016 22:27:09 +0000 (23:27 +0100)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 6 Apr 2017 09:36:21 +0000 (17:36 +0800)
Adding LLVM_TARGET(AMDGPU) causes LLVMInitializeAMDPU* prototypes definition,
but this needs to be controlled by defining FORCE_BUILD_AMDGPU,
in order to avoid building errors in clients not having AMDGPU support
like for example md.lc which is broken by LLVM_TARGET(AMDGPU)

Mesa amd/common and gallium radeonsi will require to define FORCE_BUILD_AMDGPU
in Android makefiles in order to materialize LLVMInitializeAMDGPU* prototypes

device/include/llvm/Config/AsmParsers.def
device/include/llvm/Config/AsmPrinters.def
device/include/llvm/Config/Targets.def

index 93d1be4..3e6c25d 100755 (executable)
 #elif defined(__i386__) || defined(__x86_64__)
   LLVM_ASM_PARSER(X86)
 
+#if defined(FORCE_BUILD_AMDGPU)
+  LLVM_ASM_PARSER(AMDGPU)
+#endif
+
 #if defined(FORCE_BUILD_ARM)
   LLVM_ASM_PARSER(ARM)
   LLVM_ASM_PARSER(AArch64)
index f367c10..1d8d9ea 100755 (executable)
 #elif defined(__i386__) || defined(__x86_64__)
   LLVM_ASM_PRINTER(X86)
 
+#if defined(FORCE_BUILD_AMDGPU)
+  LLVM_ASM_PRINTER(AMDGPU)
+#endif
+
 #if defined(FORCE_BUILD_ARM)
   LLVM_ASM_PRINTER(ARM)
   LLVM_ASM_PRINTER(AArch64)
index 82acbf8..faac965 100755 (executable)
 #elif defined(__i386__) || defined(__x86_64__)
   LLVM_TARGET(X86)
 
+#if defined(FORCE_BUILD_AMDGPU)
+  LLVM_TARGET(AMDGPU)
+#endif
+
 #if defined(FORCE_BUILD_ARM)
   LLVM_TARGET(ARM)
   LLVM_TARGET(AArch64)