- Meson: 1.2.0
- Bindgen: 0.62.0
- LLVM: 11.0.0 (recommended: 15.0.0)
+- Clang: 11.0.0 (recommended: 15.0.0)
+ Updating clang requires a rebuilt of mesa and rusticl if and only if the value of
+ ``CLANG_RESOURCE_DIR`` changes. It is defined through ``clang/Config/config.h``.
- SPIRV-Tools: any version (recommended: v2022.3)
Afterwards you only need to add ``-Dgallium-rusticl=true -Dllvm=enabled
#include <llvm-c/Target.h>
#include <LLVMSPIRVLib/LLVMSPIRVLib.h>
+#include <clang/Config/config.h>
#include <clang/Driver/Driver.h>
#include <clang/CodeGen/CodeGenAction.h>
#include <clang/Lex/PreprocessorOptions.h>
using ::llvm::LLVMContext;
using ::llvm::Module;
using ::llvm::raw_string_ostream;
+using ::clang::driver::Driver;
static void
llvm_log_handler(const ::llvm::DiagnosticInfo &di, void *data) {
// because we might have linked clang statically.
auto libclang_path = fs::path(LLVM_LIB_DIR) / "libclang.so";
auto clang_res_path =
- fs::path(clang::driver::Driver::GetResourcesPath(libclang_path.string())) / "include";
+ fs::path(Driver::GetResourcesPath(libclang_path.string(), CLANG_RESOURCE_DIR)) / "include";
c->getHeaderSearchOpts().UseBuiltinIncludes = true;
c->getHeaderSearchOpts().UseStandardSystemIncludes = true;