diff options
author | Ray Molenkamp <github@lazydodo.com> | 2021-02-24 17:13:37 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2021-02-24 17:13:37 +0300 |
commit | 4fb0c83c1c8529b61d38d8a409caf58d05a53bd9 (patch) | |
tree | 18ce99c74a8305a63f93b4ef57a5648818d3352c /build_files/build_environment/cmake/osl.cmake | |
parent | 5be72125bf4dfddf5dfe720caa12b3163f540faf (diff) |
Cmake/deps: Update OSL to 1.11.10.0
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
Diffstat (limited to 'build_files/build_environment/cmake/osl.cmake')
-rw-r--r-- | build_files/build_environment/cmake/osl.cmake | 42 |
1 files changed, 11 insertions, 31 deletions
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 |