From: Tom Stellard Date: Mon, 1 Oct 2012 21:01:06 +0000 (+0000) Subject: radeon/llvm: Only initialize the AMDGPU target X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2f17fc348c847bbf5c54bb75b76e1661e8ced60;p=mesa.git radeon/llvm: Only initialize the AMDGPU target --- diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index 625b0b491d6..2f2eb4cb48e 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -86,17 +86,11 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, Triple AMDGPUTriple(sys::getDefaultTargetTriple()); -#ifdef EXTERNAL_LLVM - /* XXX: Can we just initialize the AMDGPU target here? */ - InitializeAllTargets(); - InitializeAllTargetMCs(); - InitializeAllAsmPrinters(); -#else LLVMInitializeAMDGPUTargetInfo(); LLVMInitializeAMDGPUTarget(); LLVMInitializeAMDGPUTargetMC(); LLVMInitializeAMDGPUAsmPrinter(); -#endif + std::string err; const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err); if(!AMDGPUTarget) {