[Mesa-dev] [PATCH] gallivm: fix build for LLVM 3.2

Mathias Fröhlich Mathias.Froehlich at gmx.net
Tue Sep 30 13:40:56 PDT 2014


Hi Brian,

On Tuesday, September 30, 2014 13:30:21 Brian Paul wrote:
> Move the USE_MCJIT / HAVE_AVX determination logic to lp_bld.h.  If we
> don't have MCJIT define a dummy LLVMMCJITMemoryManagerRef type to avoid
> excessive #ifdef testing elsewhere.
[...]
> @@ -219,7 +188,7 @@ gallivm_free_code(struct gallivm_state *gallivm)
>     assert(!gallivm->engine);
>     lp_free_generated_code(gallivm->code);
>     gallivm->code = NULL;
> -#if HAVE_LLVM < 0x0306
> +#if USE_MCJIT
We will probably still need the < 0x0306 check:
#if HAVE_LLVM < 0x0306 && USE_MCJIT
since this memorymanager stuff just vanished in the way 3.5 implemented
this with version 3.6.

>     LLVMDisposeMCJITMemoryManager(gallivm->memorymgr);
>     gallivm->memorymgr = NULL;
>  #endif
> 

Also, we will probably fail to compile the LLVMDisposeMCJITMemoryManager
call under some configurations with MCJIT and older llvm.
So, additionally to what you had, how about the attached one?
I am still trying to verify this change against 3.5 and 3.6.
I am not sure about 3.2 since it did not build out of the box with
my configure line.

Greetings

Mathias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gallivm-fix-build-for-LLVM-3.2.patch
Type: text/x-patch
Size: 4925 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140930/6b2f1b3d/attachment-0001.bin>


More information about the mesa-dev mailing list