gallivm: Fix build against LLVM SVN >= r216982
Only MCJIT is available anymore. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
8abdc3c4a9
commit
58b386dce4
|
@ -43,6 +43,14 @@
|
|||
#include <llvm-c/BitWriter.h>
|
||||
|
||||
|
||||
/* Only MCJIT is available as of LLVM SVN r216982 */
|
||||
#if HAVE_LLVM >= 0x0306
|
||||
|
||||
#define USE_MCJIT 1
|
||||
#define HAVE_AVX 1
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* AVX is supported in:
|
||||
* - standard JIT from LLVM 3.2 onwards
|
||||
|
@ -64,6 +72,7 @@
|
|||
# define HAVE_AVX 0
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_LLVM >= 0x0306 */
|
||||
|
||||
#if USE_MCJIT
|
||||
void LLVMLinkInMCJIT();
|
||||
|
|
|
@ -456,7 +456,9 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||
.setOptLevel((CodeGenOpt::Level)OptLevel);
|
||||
|
||||
if (useMCJIT) {
|
||||
#if HAVE_LLVM < 0x0306
|
||||
builder.setUseMCJIT(true);
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* MCJIT works on Windows, but currently only through ELF object format.
|
||||
|
|
Loading…
Reference in New Issue