radeon/llvm: Only initialize the AMDGPU target
authorTom Stellard <thomas.stellard@amd.com>
Mon, 1 Oct 2012 21:01:06 +0000 (21:01 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 1 Oct 2012 21:14:10 +0000 (21:14 +0000)
src/gallium/drivers/radeon/radeon_llvm_emit.cpp

index 625b0b491d65ad8fe88c7c74360dd4e5c3eaabd5..2f2eb4cb48eb9dedb605f124e236853428851526 100644 (file)
@@ -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) {