diff options
Diffstat (limited to 'build_files/build_environment')
-rw-r--r-- | build_files/build_environment/CMakeLists.txt | 1 | ||||
-rw-r--r-- | build_files/build_environment/cmake/clang.cmake | 104 | ||||
-rw-r--r-- | build_files/build_environment/cmake/harvest.cmake | 10 | ||||
-rw-r--r-- | build_files/build_environment/cmake/ispc.cmake | 13 | ||||
-rw-r--r-- | build_files/build_environment/cmake/llvm.cmake | 21 | ||||
-rw-r--r-- | build_files/build_environment/cmake/openmp.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/cmake/osl.cmake | 42 | ||||
-rw-r--r-- | build_files/build_environment/cmake/versions.cmake | 22 | ||||
-rw-r--r-- | build_files/build_environment/patches/llvm.diff | 4 | ||||
-rw-r--r-- | build_files/build_environment/patches/osl.diff | 24 | ||||
-rw-r--r-- | build_files/build_environment/windows/build_deps.cmd | 4 |
11 files changed, 63 insertions, 184 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index b2f16508bb5..aa6b1cbe539 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -71,7 +71,6 @@ include(cmake/opensubdiv.cmake) include(cmake/sdl.cmake) include(cmake/opencollada.cmake) include(cmake/llvm.cmake) -include(cmake/clang.cmake) if(APPLE) include(cmake/openmp.cmake) endif() diff --git a/build_files/build_environment/cmake/clang.cmake b/build_files/build_environment/cmake/clang.cmake deleted file mode 100644 index d8d83619e1a..00000000000 --- a/build_files/build_environment/cmake/clang.cmake +++ /dev/null @@ -1,104 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# ***** END GPL LICENSE BLOCK ***** - -set(CLANG_EXTRA_ARGS - -DLLVM_DIR="${LIBDIR}/llvm/lib/cmake/llvm/" - -DLLVM_USE_CRT_RELEASE=MD - -DLLVM_USE_CRT_DEBUG=MDd - -DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config -) - -set(BUILD_CLANG_TOOLS OFF) - -if(WIN32) - set(CLANG_GENERATOR "Ninja") -else() - set(CLANG_GENERATOR "Unix Makefiles") -endif() - -if(APPLE) - set(BUILD_CLANG_TOOLS ON) - set(CLANG_EXTRA_ARGS ${CLANG_EXTRA_ARGS} - -DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a - ) -endif() - -if(BUILD_CLANG_TOOLS) - # ExternalProject_Add does not allow multiple tarballs to be - # downloaded. Work around this by having an empty build action - # for the extra tools, and referring the clang build to the location - # of the clang-tools-extra source. - ExternalProject_Add(external_clang_tools - URL ${CLANG_TOOLS_URI} - DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL_HASH MD5=${CLANG_TOOLS_HASH} - INSTALL_DIR ${LIBDIR}/clang_tools - PREFIX ${BUILD_DIR}/clang_tools - CONFIGURE_COMMAND echo "." - BUILD_COMMAND echo "." - INSTALL_COMMAND echo "." - ) - list(APPEND CLANG_EXTRA_ARGS - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=${BUILD_DIR}/clang_tools/src/external_clang_tools/ - ) -endif() - -ExternalProject_Add(external_clang - URL ${CLANG_URI} - DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL_HASH MD5=${CLANG_HASH} - PREFIX ${BUILD_DIR}/clang - CMAKE_GENERATOR ${CLANG_GENERATOR} - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS} - INSTALL_DIR ${LIBDIR}/clang -) - -if(MSVC) - if(BUILD_MODE STREQUAL Release) - set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/) - else() - set(CLANG_HARVEST_COMMAND - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ - ) - endif() - ExternalProject_Add_Step(external_clang after_install - COMMAND ${CLANG_HARVEST_COMMAND} - DEPENDEES mkdir update patch download configure build install - ) -endif() - -add_dependencies( - external_clang - ll -) - -if(BUILD_CLANG_TOOLS) - # `external_clang_tools` is for downloading the source, not compiling it. - add_dependencies( - external_clang - external_clang_tools - ) -endif() - -# We currently do not build libxml2 on Windows. -if(NOT WIN32) - add_dependencies( - external_clang - external_xml2 - ) -endif() diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index 388c8adb5dc..23d0dcbab7b 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -97,15 +97,15 @@ harvest(jemalloc/lib jemalloc/lib "*.a") harvest(jpg/include jpeg/include "*.h") harvest(jpg/lib jpeg/lib "libjpeg.a") harvest(lame/lib ffmpeg/lib "*.a") -harvest(clang/bin llvm/bin "clang-format") +harvest(llvm/bin llvm/bin "clang-format") if(BUILD_CLANG_TOOLS) - harvest(clang/bin llvm/bin "clang-tidy") - harvest(clang/share/clang llvm/share "run-clang-tidy.py") + harvest(llvm/bin llvm/bin "clang-tidy") + harvest(llvm/share/clang llvm/share "run-clang-tidy.py") endif() -harvest(clang/include llvm/include "*") harvest(llvm/include llvm/include "*") harvest(llvm/bin llvm/bin "llvm-config") harvest(llvm/lib llvm/lib "libLLVM*.a") +harvest(llvm/lib llvm/lib "libclang*.a") if(APPLE) harvest(openmp/lib openmp/lib "*") harvest(openmp/include openmp/include "*.h") @@ -158,7 +158,7 @@ harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a") harvest(osl/bin osl/bin "oslc") harvest(osl/include osl/include "*.h") harvest(osl/lib osl/lib "*.a") -harvest(osl/shaders osl/shaders "*.h") +harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h") harvest(png/include png/include "*.h") harvest(png/lib png/lib "*.a") harvest(pugixml/include pugixml/include "*.hpp") diff --git a/build_files/build_environment/cmake/ispc.cmake b/build_files/build_environment/cmake/ispc.cmake index 440f6e5bace..58e3873097d 100644 --- a/build_files/build_environment/cmake/ispc.cmake +++ b/build_files/build_environment/cmake/ispc.cmake @@ -39,8 +39,8 @@ elseif(APPLE) endif() elseif(UNIX) set(ISPC_EXTRA_ARGS_UNIX - -DCMAKE_C_COMPILER=${LIBDIR}/clang/bin/clang - -DCMAKE_CXX_COMPILER=${LIBDIR}/clang/bin/clang++ + -DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang + -DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++ -DARM_ENABLED=Off ) endif() @@ -51,11 +51,11 @@ set(ISPC_EXTRA_ARGS -DISPC_INCLUDE_TESTS=Off -DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm -DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib - -DCLANG_EXECUTABLE=${LIBDIR}/clang/bin/clang - -DCLANGPP_EXECUTABLE=${LIBDIR}/clang/bin/clang++ + -DCLANG_EXECUTABLE=${LIBDIR}/llvm/bin/clang + -DCLANGPP_EXECUTABLE=${LIBDIR}/llvm/bin/clang++ -DISPC_INCLUDE_TESTS=Off - -DCLANG_LIBRARY_DIR=${LIBDIR}/clang/lib - -DCLANG_INCLUDE_DIRS=${LIBDIR}/clang/include + -DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib + -DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include ${ISPC_EXTRA_ARGS_WIN} ${ISPC_EXTRA_ARGS_APPLE} ${ISPC_EXTRA_ARGS_UNIX} @@ -74,7 +74,6 @@ ExternalProject_Add(external_ispc add_dependencies( external_ispc ll - external_clang ) if(WIN32) diff --git a/build_files/build_environment/cmake/llvm.cmake b/build_files/build_environment/cmake/llvm.cmake index a4c7ccd9e27..da2f7364e4a 100644 --- a/build_files/build_environment/cmake/llvm.cmake +++ b/build_files/build_environment/cmake/llvm.cmake @@ -22,6 +22,15 @@ else() set(LLVM_TARGETS X86) endif() +if(APPLE) + set(LLVM_XML2_ARGS + -DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a + ) + set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra) + set(BUILD_CLANG_TOOLS ON) +endif() + + set(LLVM_EXTRA_ARGS -DLLVM_USE_CRT_RELEASE=MD -DLLVM_USE_CRT_DEBUG=MDd @@ -31,6 +40,8 @@ set(LLVM_EXTRA_ARGS -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_LLVM_C_DYLIB=OFF -DLLVM_ENABLE_UNWIND_TABLES=OFF + -DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA} + ${LLVM_XML2_ARGS} ) if(WIN32) @@ -45,7 +56,9 @@ ExternalProject_Add(ll DOWNLOAD_DIR ${DOWNLOAD_DIR} URL_HASH MD5=${LLVM_HASH} CMAKE_GENERATOR ${LLVM_GENERATOR} + LIST_SEPARATOR ^^ PREFIX ${BUILD_DIR}/ll + SOURCE_SUBDIR llvm PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/llvm @@ -65,3 +78,11 @@ if(MSVC) DEPENDEES mkdir update patch download configure build install ) endif() + +# We currently do not build libxml2 on Windows. +if(APPLE) + add_dependencies( + ll + external_xml2 + ) +endif() diff --git a/build_files/build_environment/cmake/openmp.cmake b/build_files/build_environment/cmake/openmp.cmake index ec0756a6693..92a96b4dd8b 100644 --- a/build_files/build_environment/cmake/openmp.cmake +++ b/build_files/build_environment/cmake/openmp.cmake @@ -30,5 +30,5 @@ ExternalProject_Add(external_openmp add_dependencies( external_openmp - external_clang + ll ) diff --git a/build_files/build_environment/cmake/osl.cmake b/build_files/build_environment/cmake/osl.cmake index 118657461fe..78930182f2b 100644 --- a/build_files/build_environment/cmake/osl.cmake +++ b/build_files/build_environment/cmake/osl.cmake @@ -19,12 +19,7 @@ if(WIN32) set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}") set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe) - set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}") - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") - set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0) - else() - set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2) - endif() + set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2) SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON) else() set(OSL_CMAKE_CXX_STANDARD_LIBRARIES) @@ -34,7 +29,6 @@ else() endif() set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/openexr/lib/Imath${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Half{OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/IlmThread${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Iex${OPENEXR_VERSION_POSTFIX}.lib") -set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}") set(OSL_EXTRA_ARGS -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING} @@ -45,13 +39,8 @@ set(OSL_EXTRA_ARGS -DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/ -DBoost_NO_SYSTEM_PATHS=ON -DBoost_NO_BOOST_CMAKE=ON - -DLLVM_DIRECTORY=${LIBDIR}/llvm - -DLLVM_INCLUDES=${LIBDIR}/llvm/include - -DLLVM_LIB_DIR=${LIBDIR}/llvm/lib - -DLLVM_VERSION=3.4 - -DLLVM_LIBRARY=${OSL_LLVM_LIBRARY} - -DOPENEXR_HOME=${LIBDIR}/openexr/ - -DILMBASE_HOME=${LIBDIR}/openexr/ + -DOpenEXR_ROOT=${LIBDIR}/openexr/ + -DIlmBase_ROOT=${LIBDIR}/openexr/ -DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/ -DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT} -DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT} @@ -59,37 +48,29 @@ set(OSL_EXTRA_ARGS -DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT} -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/ -DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT} + -DOpenImageIO_ROOT=${LIBDIR}/openimageio/ -DOSL_BUILD_TESTS=OFF -DOSL_BUILD_MATERIALX=OFF -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY} -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/ - -DOPENIMAGEIOHOME=${LIBDIR}/openimageio/ - -DOPENIMAGEIO_INCLUDE_DIR=${LIBDIR}/openimageio/include - -DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY} ${OSL_FLEX_BISON} -DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES} - -DBUILDSTATIC=ON + -DBUILD_SHARED_LIBS=OFF ${OSL_PLATFORM_FLAGS} - -DOSL_BUILD_PLUGINS=Off + -DOSL_BUILD_PLUGINS=OFF -DSTOP_ON_WARNING=OFF -DUSE_LLVM_BITCODE=OFF + -DLLVM_ROOT=${LIBDIR}/llvm/ + -DLLVM_DIRECTORY=${LIBDIR}/llvm/ -DUSE_PARTIO=OFF -DUSE_QT=OFF + -DUSE_Qt5=OFF -DINSTALL_DOCS=OFF ${OSL_SIMD_FLAGS} - -DPARTIO_LIBRARIES= - -DPUGIXML_HOME=${LIBDIR}/pugixml + -Dpugixml_ROOT=${LIBDIR}/pugixml + -DUSE_PYTHON=OFF ) -if(APPLE) - # Make symbol hiding consistent with OIIO which defaults to OFF, - # avoids linker warnings on macOS - set(OSL_EXTRA_ARGS - ${OSL_EXTRA_ARGS} - -DHIDE_SYMBOLS=OFF - ) -endif() - ExternalProject_Add(external_osl URL ${OSL_URI} DOWNLOAD_DIR ${DOWNLOAD_DIR} @@ -105,7 +86,6 @@ add_dependencies( external_osl external_boost ll - external_clang external_openexr external_zlib external_flexbison diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 9cf9d2330fd..5b9c709d04b 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -116,28 +116,16 @@ set(OPENCOLORIO_HASH 1a2e3478b6cd9a1549f24e1b2205e3f0) if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")) # Newer version required by ISPC with arm support. set(LLVM_VERSION 11.0.1) - set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz) + set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.tar.xz) set(LLVM_HASH 6ec7ae9fd43da9b87cda15b3ab9cc7af) - set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz) - set(CLANG_HASH b4cb0b74b1f3292a89c9720f3e1e2934) - - set(CLANG_TOOLS_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-tools-extra-${LLVM_VERSION}.src.tar.xz) - set(CLANG_TOOLS_HASH 1e577a85948a0f07483b7c405e59a0ca) - set(OPENMP_VERSION 9.0.1) set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${OPENMP_VERSION}/openmp-${OPENMP_VERSION}.src.tar.xz) set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf) else() set(LLVM_VERSION 9.0.1) - set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz) - set(LLVM_HASH 31eb9ce73dd2a0f8dcab8319fb03f8fc) - - set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz) - set(CLANG_HASH 13468e4a44940efef1b75e8641752f90) - - set(CLANG_TOOLS_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-tools-extra-${LLVM_VERSION}.src.tar.xz) - set(CLANG_TOOLS_HASH c76293870b564c6a7968622b475b7646) + set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.tar.xz) + set(LLVM_HASH b4268e733dfe352960140dc07ef2efcb) set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz) set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf) @@ -151,9 +139,9 @@ set(TIFF_VERSION 4.1.0) set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz) set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424) -set(OSL_VERSION 1.10.10) +set(OSL_VERSION 1.11.10.0) set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz) -set(OSL_HASH 00dec08a93c8084e53848b9ad047889f) +set(OSL_HASH dfdc23597aeef083832cbada62211756) set(PYTHON_VERSION 3.9.1) set(PYTHON_SHORT_VERSION 3.9) diff --git a/build_files/build_environment/patches/llvm.diff b/build_files/build_environment/patches/llvm.diff index b797bb030ee..5f89816292b 100644 --- a/build_files/build_environment/patches/llvm.diff +++ b/build_files/build_environment/patches/llvm.diff @@ -1,5 +1,5 @@ ---- a/lib/Support/Unix/Path.inc 2020-02-17 09:24:26.000000000 +0100 -+++ b/lib/Support/Unix/Path.inc 2020-02-17 09:26:25.000000000 +0100 +--- a/llvm/lib/Support/Unix/Path.inc 2020-02-17 09:24:26.000000000 +0100 ++++ b/llvm/lib/Support/Unix/Path.inc 2020-02-17 09:26:25.000000000 +0100 @@ -1200,7 +1200,9 @@ /// implementation. std::error_code copy_file(const Twine &From, const Twine &To) { diff --git a/build_files/build_environment/patches/osl.diff b/build_files/build_environment/patches/osl.diff index 989800174e2..badb6c0d9b3 100644 --- a/build_files/build_environment/patches/osl.diff +++ b/build_files/build_environment/patches/osl.diff @@ -43,27 +43,23 @@ diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp extern - +void LLVM_Util::Cleanup () +{ -+ jitmm_hold.clear(); ++ if(jitmm_hold) jitmm_hold->clear(); +} size_t LLVM_Util::total_jit_memory_held () -diff -Naur OpenShadingLanguage-Release-1.9.9/CMakeLists.txt external_osl/CMakeLists.txt - --- orig/CMakeLists.txt 2020-01-27 16:22:31 -0700 -+++ external_osl/CMakeLists.txt 2020-05-13 18:04:52 -0600 -@@ -102,10 +102,11 @@ - set (OPTIX_EXTRA_LIBS CACHE STRING "Extra lib targets needed for OptiX") - set (CUDA_TARGET_ARCH "sm_35" CACHE STRING "CUDA GPU architecture (e.g. sm_35)") - --# set (USE_OIIO_STATIC ON CACHE BOOL "If OIIO is built static") --# if (USE_OIIO_STATIC) --# add_definitions ("-DOIIO_STATIC_BUILD=1") --# endif () +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)
\ No newline at end of file + if (OSL_NO_DEFAULT_TEXTURESYSTEM) diff --git a/build_files/build_environment/windows/build_deps.cmd b/build_files/build_environment/windows/build_deps.cmd index ea8bfdaa3d2..2552b74711f 100644 --- a/build_files/build_environment/windows/build_deps.cmd +++ b/build_files/build_environment/windows/build_deps.cmd @@ -117,7 +117,7 @@ set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads mkdir %STAGING%\%BuildDir%%ARCH%R cd %Staging%\%BuildDir%%ARCH%R echo %DATE% %TIME% : Start > %StatusFile% -cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ +cmake -G "%CMAKE_BUILDER%" -Thost=x64 %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ echo %DATE% %TIME% : Release Configuration done >> %StatusFile% if "%dobuild%" == "1" ( msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal @@ -130,7 +130,7 @@ if "%NODEBUG%" == "1" goto exit cd %BUILD_DIR% mkdir %STAGING%\%BuildDir%%ARCH%D cd %Staging%\%BuildDir%%ARCH%D -cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS% +cmake -G "%CMAKE_BUILDER%" -Thost=x64 %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS% echo %DATE% %TIME% : Debug Configuration done >> %StatusFile% if "%dobuild%" == "1" ( msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal |