mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-01-24 22:53:51 +08:00
meson: Try to link all-targets module if Gallium OpenCL is enabled
If we don't do this, and we are statically linking LLVM (-Dshared-llvm=disabled) while using a version of LLVM compiled for a general-purpose distribution, then the link fails with undefined references to the functions called by LLVMInitializeAllTargets(). Using a version of LLVM that was built specifically for Mesa will sometimes mask this: if the only backends built into LLVM are backends that we specifically link anyway, then the link will succeed. According to commit80817b6e
"meson: Adjust Clover's required LLVM modules", all-targets is not available when using CMake to locate LLVM, so make it optional rather than mandatory. This partially reverts commit80817b6e34
. Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3962 Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5609 Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13720>
This commit is contained in:
parent
cac6f633b2
commit
949b5787ee
@ -1634,7 +1634,7 @@ if with_gallium_opencl
|
||||
'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
|
||||
'lto', 'option', 'objcarcopts', 'profiledata'
|
||||
]
|
||||
llvm_optional_modules += ['frontendopenmp']
|
||||
llvm_optional_modules += ['all-targets', 'frontendopenmp']
|
||||
endif
|
||||
if with_clc
|
||||
llvm_modules += ['coverage', 'target', 'linker', 'irreader', 'option', 'libdriver', 'lto']
|
||||
|
Loading…
Reference in New Issue
Block a user