clc: Print errors when initializing clang fails

It's nice to know what actually went wrong.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33576>
This commit is contained in:
Konstantin Seurer 2025-02-17 10:01:48 +01:00 committed by Marge Bot
parent b9c6afd3a7
commit ed07aab147

View file

@ -840,7 +840,7 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
if (!clang::CompilerInvocation::CreateFromArgs(c->getInvocation(),
clang_opts,
diag)) {
clc_error(logger, "Couldn't create Clang invocation.\n");
clc_error(logger, "Couldn't create Clang invocation.\n%s\n", diag_log_str.c_str());
return {};
}