diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-08-28 04:37:55 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-08-28 04:38:31 +0300 |
commit | 5e8a030a08b73a1fbd94ed11dcc51d26f1c27dad (patch) | |
tree | e3b803f98ea30bc97a70267fb736cea6d2cbe699 /intern/cycles/render/osl.cpp | |
parent | 6dd394bf02b121a61fb8bdf153b778330a3d9320 (diff) |
cmake: adjustments required for lib-upgrade on windows.
Diffstat (limited to 'intern/cycles/render/osl.cpp')
-rw-r--r-- | intern/cycles/render/osl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index fdd872f62b9..2bf69c869b9 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -28,6 +28,7 @@ #include "kernel/osl/osl_globals.h" #include "kernel/osl/osl_services.h" #include "kernel/osl/osl_shader.h" +#include "OSL/llvm_util.h" #include "util/util_foreach.h" #include "util/util_logging.h" @@ -66,6 +67,14 @@ OSLShaderManager::~OSLShaderManager() { shading_system_free(); texture_system_free(); +#ifdef OSL_HAS_BLENDER_CLEANUP_FIX + /* There is a problem with llvm+osl: The order global destructors across + * different compilation units run cannot be guaranteed, on windows this means + * that the llvm destructors run before the osl destructors, causing a crash + * when the process exits. the OSL in svn has a special cleanup hack to + * sidestep this behavior */ + OSL::pvt::LLVM_Util::Cleanup(); +#endif } void OSLShaderManager::reset(Scene * /*scene*/) |