mesa/src/compiler
Antoine Coutant ec84f5a1e2 clc: retrieve libclang path at runtime.
LLVM_LIB_DIR is a variable used for runtime compilations.
When cross compiling, LLVM_LIB_DIR must be set to the
libclang path on the target. So, this path should not
be retrieved during compilation but at runtime.

dladdr uses an address to search for a loaded library.
If a library is found, it returns information about it.
The path to the libclang library can therefore be
retrieved using one of its functions. This is useful
because we don't know the name of the libclang library
(libclang.so.X or libclang-cpp.so.X)

v2 (Karol): use clang::CompilerInvocation::CreateFromArgs for dladdr
v3 (Karol): follow symlinks to fix errors on debian

Fixes: e22491c832 ("clc: fetch clang resource dir at runtime")
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by (v1): Jesse Natalie <jenatali@microsoft.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
(cherry picked from commit 445aacb4217cbf5fb7be604c5484eb84c3c06497)
2024-01-31 22:21:24 +00:00
..
clc clc: retrieve libclang path at runtime. 2024-01-31 22:21:24 +00:00
glsl glsl/nir: fix gl_nir_cross_validate_outputs_to_inputs() memory leak 2024-01-16 18:41:36 +00:00
isaspec isaspec: Add bool_inv type to print inverted bools 2023-12-16 14:34:18 +00:00
nir nir/builder: Fix compilation with gcc-13 when tsan is enabled 2024-01-31 22:21:23 +00:00
spirv vtn: Use secure_getenv for shader dumping 2024-01-31 22:21:23 +00:00
builtin_types.py compiler/types: Use Python to generate code for builtin types 2023-09-16 15:17:01 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
glsl_types.c compiler/types: Use a typedef for glsl_type 2023-12-22 07:53:25 -08:00
glsl_types.h util,compiler: Avoid use align as variable, replace it with other names 2024-01-05 02:42:05 +00:00
meson.build treewide: Replace the include of nir_types.h with glsl_types.h 2023-12-30 15:08:11 +00:00
shader_enums.c nir: add lowering from FS LAYER input to LAYER_ID sysval 2023-11-24 15:37:24 +00:00
shader_enums.h nir: add lowering from FS LAYER input to LAYER_ID sysval 2023-11-24 15:37:24 +00:00
shader_info.h nir/serialize: untangle printf serialization from a particular stage 2023-12-12 11:11:10 +00:00