Commit fe10e4af authored by Cianciosa, Mark's avatar Cianciosa, Mark
Browse files

Merge branch 'build_fix' into 'main'

The API for compiler instance changed. Fix new build dependecies.

See merge request !43
parents 74d63755 fabde810
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ FetchContent_GetProperties (
)

#  Do not build llvm until pull command is finished.
add_dependencies (gpu-resource-headers pull_llvm)
add_dependencies (llvm-offload-resource-headers pull_llvm)
add_dependencies (LLVMDemangle pull_llvm)
add_dependencies (Remarks_exports pull_llvm)
+4 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
//  Clang headers will define IBAction and IBOutlet these so undefine them here.
#undef IBAction
#undef IBOutlet
#include "llvm/Support/VirtualFileSystem.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Frontend/CompilerInstance.h"
@@ -178,7 +179,9 @@ namespace gpu {

            clang::CompilerInstance clang;
            clang.setInvocation(invocation);
            clang.createDiagnostics();
            std::shared_ptr<llvm::vfs::FileSystem> VFS =
                std::make_shared<llvm::vfs::InMemoryFileSystem> ();
            clang.createDiagnostics(*VFS.get());

            const auto target_options = std::make_shared<clang::TargetOptions> ();
            target_options->Triple = llvm::sys::getProcessTriple();