0
0
forked from blender/blender
Files
Ray molenkamp b9c37608a9 Build: upgrade many library dependencies to new versions for Blender 3.2
This only updates the build system, precompiled libraries for the various
platforms will be committed over the coming week.

New:
fmt 8.0.0
level_zero v1.7.15
pystring v1.1.3
robinmap v0.6.2
webp 1.2.2

Updated:
alembic 1.8.3
blosc 1.21.1
boost 1.78.0
embree 3.13.3
ffmpeg 5.0
fftw 3.3.10
flac 1.3.4
imath 3.1.4
ispc v1.17.0
jpeg 2.1.3
ogg 1.3.5
oidn 1.4.3
openal 1.21.1
opencolorio 2.1.1
openexr 3.1.4
openimageio v2.3.13.0
openjpeg 2.4.0
opensubdiv v3_4_4
openvdb 9.0.0
osl 1.11.17.0
sdl 2.0.20
tbb 2020_u3
tiff 4.3.0
usd 22.03
vorbis 1.3.7
vpx 1.11.0
x264 35fe20d1b
zlib 1.2.12

Implemented by Ray Molenkamp, Sybren Stüvel and Brecht Van Lommel.

Ref T95206
2022-04-20 16:42:16 +02:00

79 lines
3.0 KiB
Diff

diff -Naur ispc-1.17.0.org/CMakeLists.txt ispc-1.17.0/CMakeLists.txt
--- ispc-1.17.0.org/CMakeLists.txt 2022-01-15 01:35:15 -0700
+++ ispc-1.17.0/CMakeLists.txt 2022-02-12 12:44:24 -0700
@@ -36,8 +36,12 @@
cmake_minimum_required(VERSION 3.13)
if (UNIX)
- set(CMAKE_C_COMPILER "clang")
- set(CMAKE_CXX_COMPILER "clang++")
+ if (NOT CMAKE_C_COMPILER)
+ set(CMAKE_C_COMPILER "clang")
+ endif()
+ if (NOT CMAKE_CXX_COMPILER)
+ set(CMAKE_CXX_COMPILER "clang++")
+ endif()
endif()
set(PROJECT_NAME ispc)
@@ -443,7 +447,7 @@
# Include directories
target_include_directories(${PROJECT_NAME} PRIVATE
- ${LLVM_INCLUDE_DIRS}
+ ${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS}
${XE_DEPS_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
@@ -507,7 +511,7 @@
# Link against Clang libraries
foreach(clangLib ${CLANG_LIBRARY_LIST})
- find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS})
+ find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS} ${CLANG_LIBRARY_DIR})
list(APPEND CLANG_LIBRARY_FULL_PATH_LIST ${${clangLib}Path})
endforeach()
target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_FULL_PATH_LIST})
@@ -546,6 +550,29 @@
endif()
endif()
+# Link against libstdc++.a which must be provided to the linker after
+# LLVM and CLang libraries.
+# This is needed because some of LLVM/CLang dependencies are using
+# std::make_shared, which is defined in one of those:
+# - libclang-cpp.so
+# - libstdc++.a
+# Using the former one is tricky because then generated binary depends
+# on a library which is outside of the LD_LIBRARY_PATH.
+#
+# Hence, using C++ implementation from G++ which seems to work just fine.
+# In fact, from investigation seems that libclang-cpp.so itself is pulling
+# std::_Sp_make_shared_tag from G++'s libstdc++.a.
+if(UNIX AND NOT APPLE)
+ execute_process(
+ COMMAND g++ --print-file-name libstdc++.a
+ OUTPUT_VARIABLE GCC_LIBSTDCXX_A
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(GCC_LIBSTDCXX_A AND EXISTS ${GCC_LIBSTDCXX_A})
+ target_link_libraries(${PROJECT_NAME} ${GCC_LIBSTDCXX_A})
+ endif()
+endif()
+
# Build target for utility checking host ISA
if (ISPC_INCLUDE_UTILS)
add_executable(check_isa "")
diff -Naur ispc-1.17.0.org/cmake/GenerateBuiltins.cmake ispc-1.17.0/cmake/GenerateBuiltins.cmake
--- ispc-1.17.0.org/cmake/GenerateBuiltins.cmake 2022-01-15 01:35:15 -0700
+++ ispc-1.17.0/cmake/GenerateBuiltins.cmake 2022-02-12 12:44:24 -0700
@@ -124,6 +124,8 @@
if ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "x86")
set(target_arch "i686")
+ # Blender: disable 32bit due to build issues on Linux and being unnecessary.
+ set(SKIP ON)
elseif ("${bit}" STREQUAL "64" AND ${arch} STREQUAL "x86")
set(target_arch "x86_64")
elseif ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "arm")