From: Michel Dänzer Date: Wed, 3 Sep 2014 02:36:34 +0000 (+0900) Subject: gallivm: Fix build against LLVM SVN >= r216982 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58b386dce435d2d82c2dc80b1a8d1373bb3e0ac6;p=mesa.git gallivm: Fix build against LLVM SVN >= r216982 Only MCJIT is available anymore. Reviewed-by: Roland Scheidegger Signed-off-by: Michel Dänzer --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 8b8686dd2dd..ce87b8ce932 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -43,6 +43,14 @@ #include +/* 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(); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 55aa8b9bda7..2fd85a82090 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -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.