mesa/src/compiler
Antoine Coutant e43a1cd76a 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 445aacb421)
2024-01-31 22:24:25 +00:00
..
clc clc: retrieve libclang path at runtime. 2024-01-31 22:24:25 +00:00
glsl glsl/nir: fix gl_nir_cross_validate_outputs_to_inputs() memory leak 2024-01-16 18:42:47 +00:00
isaspec isaspec : fix isaspec build error in aosp 2023-10-13 11:09:40 +00:00
nir nir/builder: Fix compilation with gcc-13 when tsan is enabled 2024-01-31 22:24:25 +00:00
spirv compiler/spirv: The spirv shader is binary, should write in binary mode 2024-01-17 22:18:27 +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 compiler/types: Use a string table for builtin type names 2023-09-16 15:17:01 +00:00
builtin_types_cpp_h.py compiler/types: Use Python to generate code for builtin types 2023-09-16 15:17:01 +00:00
builtin_types_h.py compiler/types: Use Python to generate code for builtin types 2023-09-16 15:17:01 +00:00
glsl_types.c compiler/types: Remove warnings about potential fallthrough 2023-10-25 01:51:12 +00:00
glsl_types.h compiler/types: Move comments and reorganize declarations 2023-10-25 01:51:12 +00:00
glsl_types_impl.h compiler/types: Add remaining type extraction functions and use them in C++ 2023-10-25 01:51:12 +00:00
meson.build compiler/types: Rename glsl_types.cpp to glsl_types.c 2023-10-25 01:51:12 +00:00
nir_gl_types.h compiler/types: Flip wrapping of remaining small data getters 2023-10-25 01:51:12 +00:00
nir_types.h compiler/types: Move C declarations into glsl_types.h 2023-10-07 00:42:54 +00:00
shader_enums.c nir: Add shader enqueue data structures and handling 2023-08-18 16:57:22 +00:00
shader_enums.h nir: split FLOAT_CONTROLS_SIGNED_ZERO_INF_NAN_PRESERVE_FP* flags 2023-10-17 17:27:12 +00:00
shader_info.h nir: split FLOAT_CONTROLS_SIGNED_ZERO_INF_NAN_PRESERVE_FP* flags 2023-10-17 17:27:12 +00:00