diff --git a/src/cmake/modules/FindLLVM.cmake b/src/cmake/modules/FindLLVM.cmake index 2e7e5f589..56809dc3a 100644 --- a/src/cmake/modules/FindLLVM.cmake +++ b/src/cmake/modules/FindLLVM.cmake @@ -119,7 +119,8 @@ endif () foreach (COMPONENT clangFrontend clangDriver clangSerialization clangParse clangSema clangAnalysis clangAST clangASTMatchers clangEdit clangLex - clangSupport clangAPINotes clangBasic) + clangSupport clangAPINotes clangBasic + clangOptions clangAnalysisLifetimeSafety) find_library ( _CLANG_${COMPONENT}_LIBRARY NAMES ${COMPONENT} PATHS ${LLVM_LIB_DIR} diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp index f978dd101..b7dedd90e 100644 --- a/src/liboslcomp/oslcomp.cpp +++ b/src/liboslcomp/oslcomp.cpp @@ -200,6 +200,9 @@ OSLCompilerImpl::preprocess_buffer(const std::string& buffer, inst.setTarget(target); +#if OSL_LLVM_VERSION >= 220 + inst.createVirtualFileSystem(); +#endif inst.createFileManager(); #if OSL_LLVM_VERSION >= 220 inst.createSourceManager(); diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp index a6a1e75e0..e293ee651 100644 --- a/src/liboslexec/llvm_util.cpp +++ b/src/liboslexec/llvm_util.cpp @@ -684,7 +684,7 @@ LLVM_Util::debug_setup_compilation_unit(const char* compile_unit_name) osl_identity, // Identify the producer of debugging information and code. Usually this is a compiler version string. true, // isOptimized "", // This string lists command line options. This string is directly embedded in debug info output which may be used by a tool analyzing generated debugging information. - OSL_VERSION, // This indicates runtime version for languages like Objective-C + 0, // This indicates runtime version for languages like Objective-C llvm::StringRef(), // SplitName = he name of the file that we'll split debug info out into. llvm::DICompileUnit::DebugEmissionKind:: LineTablesOnly, // DICompileUnit::DebugEmissionKind