mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +02:00
fix(FTBFS): clc/clover: pass a VFS instance explicitly
This just replicates what upstream did before breaking mesa with commit
df9a14d7bbf and requiring a VFS instance.
Reported-by: @Lone_Wolf
Reference: <df9a14d7bb>
Closes: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/12223>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32439>
This commit is contained in:
parent
9afb0480c4
commit
8a453669e2
2 changed files with 18 additions and 2 deletions
|
|
@ -56,6 +56,10 @@
|
|||
#include <spirv-tools/linker.hpp>
|
||||
#include <spirv-tools/optimizer.hpp>
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 20
|
||||
#include <llvm/Support/VirtualFileSystem.h>
|
||||
#endif
|
||||
|
||||
#include "util/macros.h"
|
||||
#include "glsl_types.h"
|
||||
|
||||
|
|
@ -841,7 +845,11 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
|||
// http://www.llvm.org/bugs/show_bug.cgi?id=19735
|
||||
c->getDiagnosticOpts().ShowCarets = false;
|
||||
|
||||
c->createDiagnostics(new clang::TextDiagnosticPrinter(
|
||||
c->createDiagnostics(
|
||||
#if LLVM_VERSION_MAJOR >= 20
|
||||
*llvm::vfs::getRealFileSystem(),
|
||||
#endif
|
||||
new clang::TextDiagnosticPrinter(
|
||||
diag_log_stream,
|
||||
&c->getDiagnosticOpts()));
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@
|
|||
#include <clang/Frontend/TextDiagnosticPrinter.h>
|
||||
#include <clang/Basic/TargetInfo.h>
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 20
|
||||
#include <llvm/Support/VirtualFileSystem.h>
|
||||
#endif
|
||||
|
||||
// We need to include internal headers last, because the internal headers
|
||||
// include CL headers which have #define's like:
|
||||
//
|
||||
|
|
@ -305,7 +309,11 @@ namespace {
|
|||
::llvm::Triple(target.triple),
|
||||
get_language_version(opts, device_clc_version));
|
||||
|
||||
c->createDiagnostics(new clang::TextDiagnosticPrinter(
|
||||
c->createDiagnostics(
|
||||
#if LLVM_VERSION_MAJOR >= 20
|
||||
*llvm::vfs::getRealFileSystem(),
|
||||
#endif
|
||||
new clang::TextDiagnosticPrinter(
|
||||
*new raw_string_ostream(r_log),
|
||||
&c->getDiagnosticOpts(), true));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue