diff options
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_llvm_emit.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index eef55a8e93a..1b67bfea685 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -52,6 +52,7 @@ using namespace llvm; #ifndef EXTERNAL_LLVM extern "C" { +void LLVMInitializeAMDGPUAsmPrinter(void); void LLVMInitializeAMDGPUTargetMC(void); void LLVMInitializeAMDGPUTarget(void); void LLVMInitializeAMDGPUTargetInfo(void); @@ -93,6 +94,7 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, LLVMInitializeAMDGPUTargetInfo(); LLVMInitializeAMDGPUTarget(); LLVMInitializeAMDGPUTargetMC(); + LLVMInitializeAMDGPUAsmPrinter(); #endif std::string err; const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err); @@ -132,7 +134,7 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, formatted_raw_ostream out(oStream); /* Optional extra paramater true / false to disable verify */ - if (AMDGPUTargetMachine.addPassesToEmitFile(PM, out, TargetMachine::CGFT_AssemblyFile, + if (AMDGPUTargetMachine.addPassesToEmitFile(PM, out, TargetMachine::CGFT_ObjectFile, true)){ fprintf(stderr, "AddingPasses failed.\n"); return 1; |