diff options
author | Alexander V. Nikolaev <[email protected]> | 2012-09-23 05:28:39 +0300 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-10-28 10:34:26 +0000 |
commit | eaa8e56108e28ff5fabc8c471f4e904b53c5f8fb (patch) | |
tree | 780268841d125bf38eb555856a8fdd53de846cd9 /src/gallium/auxiliary/gallivm/lp_bld_init.c | |
parent | 459b28aba7c4ef0afe8d23dd2953e236d1bf7aed (diff) |
gallium/gallivm: code generation options for LLVM 3.1+
LLVM 3.1+ haven't more "extern unsigned llvm::StackAlignmentOverride"
and friends for configuring code generation options, like stack
alignment.
So I restrict assiging of lvm::StackAlignmentOverride and other
variables to LLVM 3.0 only, and wrote similiar code using
TargetOptions.
This patch fix segfaulting of WINE using llvmpipe built with LLVM 3.1
Signed-off-by: Alexander V. Nikolaev <[email protected]>
Signed-off-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_init.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index d364390cdf0..0065bb49a4b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -258,11 +258,12 @@ init_gallivm_engine(struct gallivm_state *gallivm) optlevel = Default; } -#if USE_MCJIT - ret = lp_build_create_mcjit_compiler_for_module(&gallivm->engine, - gallivm->module, - (unsigned) optlevel, - &error); +#if HAVE_LLVM >= 0x0301 + ret = lp_build_create_jit_compiler_for_module(&gallivm->engine, + gallivm->module, + (unsigned) optlevel, + USE_MCJIT, + &error); #else ret = LLVMCreateJITCompiler(&gallivm->engine, gallivm->provider, (unsigned) optlevel, &error); |