ba5ed71d1b
Get patches from upstream: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/commit/7bcf83eb859b4ce7ffcc599835ec2e6058fbd12f https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/2086 https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/commit/1a72c471fed2aeb18c4e58f9035b56f55c250185 https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/2124 While here refresh patches. PR: 296378 Approved by: Shane <FreeBSD@ShaneWare.Biz> (maintainer, timeout 2 weeks) Sponsored by: UNIS Labs
19 lines
575 B
C++
19 lines
575 B
C++
--- src/liboslcomp/oslcomp.cpp.orig 2025-12-01 12:53:35 UTC
|
|
+++ src/liboslcomp/oslcomp.cpp
|
|
@@ -200,8 +200,15 @@ OSLCompilerImpl::preprocess_buffer(const std::string&
|
|
|
|
inst.setTarget(target);
|
|
|
|
+#if OSL_LLVM_VERSION >= 220
|
|
+ inst.createVirtualFileSystem();
|
|
+#endif
|
|
inst.createFileManager();
|
|
+#if OSL_LLVM_VERSION >= 220
|
|
+ inst.createSourceManager();
|
|
+#else
|
|
inst.createSourceManager(inst.getFileManager());
|
|
+#endif
|
|
clang::SourceManager& sm = inst.getSourceManager();
|
|
sm.setMainFileID(sm.createFileID(std::move(mbuf), clang::SrcMgr::C_User));
|
|
|