diff options
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 16 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.h | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 243d24891da..75ef935eb22 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -306,7 +306,8 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name) assert(!gallivm->context); assert(!gallivm->module); - lp_build_init(); + if (!lp_build_init()) + return FALSE; if (USE_GLOBAL_CONTEXT) { gallivm->context = LLVMGetGlobalContext(); @@ -382,11 +383,18 @@ fail: } -void +boolean lp_build_init(void) { if (gallivm_initialized) - return; + return TRUE; + + /* XXX: Remove this once lp_bld_misc.cpp has been adapted to the removal + * of JITMemoryManager + */ +#if HAVE_LLVM >= 0x0306 + return FALSE; +#endif #ifdef DEBUG gallivm_debug = debug_get_option_gallivm_debug(); @@ -477,6 +485,8 @@ lp_build_init(void) util_cpu_caps.has_avx = 0; util_cpu_caps.has_f16c = 0; #endif + + return TRUE; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h index 2e32cf8b077..64c5278c24e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h @@ -49,7 +49,7 @@ struct gallivm_state }; -void +boolean lp_build_init(void); |