clc: force fPIC for every user when using shared LLVM
As we want to start using `dladdr`, this is needed to prevent `dladdr`
returning information of the wrong file.
Fixes tag as it's required by the actual fix.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Fixes: e22491c832 ("clc: fetch clang resource dir at runtime")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
This commit is contained in:
@@ -105,7 +105,13 @@ _libmesaclc = static_library(
|
||||
idep_mesautil, dep_spirv_tools, idep_vtn]
|
||||
)
|
||||
|
||||
_idep_mesaclc_link_args = []
|
||||
if _shared_llvm
|
||||
_idep_mesaclc_link_args += cc.get_supported_link_arguments('-fPIC')
|
||||
endif
|
||||
|
||||
idep_mesaclc = declare_dependency(
|
||||
link_with : _libmesaclc,
|
||||
include_directories : include_directories('.'),
|
||||
link_args : _idep_mesaclc_link_args,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user