ac/llvm: handle static/shared llvm init separately
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 10 Aug 2020 08:16:39 +0000 (10:16 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 17 Aug 2020 10:47:41 +0000 (10:47 +0000)
commitb7c04b1790fb69e2f0f942a286c76b3efef85eab
treedf5b972d2453982031524dba7743a9dcd5c65b86
parent916110e17f2e04d685978e6b385b3fe0d3231fe9
ac/llvm: handle static/shared llvm init separately

Having a single init function works as expected for shared llvm, but
when using a static llvm only one llvm will get initialized.

This commit introduces 2 separate init function:
- shared llvm = single public init function
- static llvm = one init function for each module using llvm

Fixes: 50d20dc055d ("ac/llvm: export ac_init_llvm_once in targets")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3376
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6253>
Android.mk
meson.build
src/amd/llvm/ac_llvm_util.c
src/amd/llvm/ac_llvm_util.h
src/amd/vulkan/meson.build
src/gallium/targets/dri-vdpau.dyn
src/gallium/targets/dri/dri.sym
src/gallium/targets/omx/omx.sym
src/gallium/targets/pipe-loader/pipe.sym
src/gallium/targets/va/va.sym
src/gallium/targets/vdpau/vdpau.sym