
This bumps OSL to 1.11.10.0. OSL Has a new build time dependency: Clang, and more importantly it expects clang and llvm to share a library folder, which it previously for us did not. This patch changes: -OSL Update to 1.11.10.0 -refactor the llvm/clang/clang-tools-extra builds into the llvm build using the llvm-project tarball for building that has all of the subprojects in it. -update ispc/openmp builds since clang no longer its own dependency and they have to depend on the llvm build now. -Update the windows builder to use the 64 bit host tools since it ran out of ram linking clang -Since OSL now needs clang to link successfully a findclang.cmake has been provided for linux/OSX Differential Revision: https://developer.blender.org/D10212 Reviewed By: brecht, sebbas, sybren
66 lines
2.6 KiB
Diff
66 lines
2.6 KiB
Diff
diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej external_osl/src/cmake/flexbison.cmake.rej
|
|
--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej 1969-12-31 17:00:00 -0700
|
|
+++ external_osl/src/cmake/flexbison.cmake.rej 2018-08-24 17:42:11 -0600
|
|
@@ -0,0 +1,11 @@
|
|
+--- src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
|
|
++++ src/cmake/flexbison.cmake 2018-08-24 10:24:03 -0600
|
|
+@@ -77,7 +77,7 @@
|
|
+ DEPENDS ${${compiler_headers}}
|
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
+ ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
|
|
+- COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
|
|
++ COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
|
|
+ MAIN_DEPENDENCY ${flexsrc}
|
|
+ DEPENDS ${${compiler_headers}}
|
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h
|
|
--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h 2018-05-01 16:39:02 -0600
|
|
+++ external_osl/src/include/OSL/llvm_util.h 2018-08-25 14:05:00 -0600
|
|
@@ -33,6 +33,8 @@
|
|
|
|
#include <vector>
|
|
|
|
+#define OSL_HAS_BLENDER_CLEANUP_FIX
|
|
+
|
|
#ifdef LLVM_NAMESPACE
|
|
namespace llvm = LLVM_NAMESPACE;
|
|
#endif
|
|
@@ -487,6 +489,7 @@
|
|
std::string func_name (llvm::Function *f);
|
|
|
|
static size_t total_jit_memory_held ();
|
|
+ static void Cleanup ();
|
|
|
|
private:
|
|
class MemoryManager;
|
|
diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp
|
|
--- OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp 2018-05-01 16:39:02 -0600
|
|
+++ external_osl/src/liboslexec/llvm_util.cpp 2018-08-25 14:04:27 -0600
|
|
@@ -140,7 +140,10 @@
|
|
};
|
|
|
|
|
|
-
|
|
+void LLVM_Util::Cleanup ()
|
|
+{
|
|
+ if(jitmm_hold) jitmm_hold->clear();
|
|
+}
|
|
|
|
size_t
|
|
LLVM_Util::total_jit_memory_held ()
|
|
diff -Naur org/CMakeLists.txt external_osl/CMakeLists.txt
|
|
--- org/CMakeLists.txt 2020-12-01 12:37:15 -0700
|
|
+++ external_osl/CMakeLists.txt 2021-01-20 13:26:50 -0700
|
|
@@ -84,6 +84,11 @@
|
|
CACHE STRING "Directory where OptiX PTX files will be installed")
|
|
set (CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library naming postfix for Debug builds (e.g., '_debug')")
|
|
|
|
+set (USE_OIIO_STATIC ON CACHE BOOL "If OIIO is built static")
|
|
+if (USE_OIIO_STATIC)
|
|
+ add_definitions ("-DOIIO_STATIC_BUILD=1")
|
|
+ add_definitions ("-DOIIO_STATIC_DEFINE=1")
|
|
+endif ()
|
|
|
|
set (OSL_NO_DEFAULT_TEXTURESYSTEM OFF CACHE BOOL "Do not use create a raw OIIO::TextureSystem")
|
|
if (OSL_NO_DEFAULT_TEXTURESYSTEM)
|