Build: Remove LLVM linking no longer needed by OSL

These are now included in the OSL shared libraries, so no reason to
link against it.

The CMake code for WITH_LLVM remains in case it is useful in the future,
but is not enabled by any Blender feature now.

Pull Request: https://projects.blender.org/blender/blender/pulls/118229
This commit is contained in:
Brecht Van Lommel
2024-02-14 12:06:52 +01:00
committed by Brecht Van Lommel
parent f344823785
commit 088ae8d905
3 changed files with 3 additions and 29 deletions

View File

@@ -703,12 +703,7 @@ mark_as_advanced(WITH_DRAW_DEBUG)
# LLVM
option(WITH_LLVM "Use LLVM" OFF)
if(APPLE)
# We prefer static llvm build on Apple, dyn build possible though.
option(LLVM_STATIC "Link with LLVM static libraries" ON)
else()
option(LLVM_STATIC "Link with LLVM static libraries" OFF)
endif()
option(LLVM_STATIC "Link with LLVM static libraries" OFF)
mark_as_advanced(LLVM_STATIC)
option(WITH_CLANG "Use Clang" OFF)
@@ -1156,14 +1151,7 @@ set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_CYCLES_OSL OFF)
# Hydra requires USD.
set_and_warn_dependency(WITH_USD WITH_HYDRA OFF)
# auto enable openimageio for cycles
if(WITH_CYCLES)
# auto enable llvm for cycles_osl
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
set(WITH_CLANG ON CACHE BOOL "" FORCE)
endif()
else()
if(NOT WITH_CYCLES)
set(WITH_CYCLES_OSL OFF)
endif()
@@ -1382,18 +1370,6 @@ if(NOT WITH_FFTW3 AND WITH_MOD_OCEANSIM)
message(FATAL_ERROR "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON")
endif()
if(WITH_CYCLES)
if(WITH_CYCLES_OSL)
if(NOT WITH_LLVM)
message(
FATAL_ERROR
"Cycles OSL requires WITH_LLVM, the library may not have been found. "
"Configure LLVM or disable WITH_CYCLES_OSL"
)
endif()
endif()
endif()
if(WITH_INTERNATIONAL)
if(NOT WITH_BOOST)
message(

View File

@@ -93,7 +93,7 @@ macro(cycles_external_libraries_append libraries)
list(APPEND ${libraries} ${GLOG_LIBRARIES} ${GFLAGS_LIBRARIES})
endif()
if(WITH_CYCLES_OSL)
list(APPEND ${libraries} ${OSL_LIBRARIES} ${CLANG_LIBRARIES} ${LLVM_LIBRARY})
list(APPEND ${libraries} ${OSL_LIBRARIES})
endif()
if(WITH_CYCLES_EMBREE)
list(APPEND ${libraries} ${EMBREE_LIBRARIES})

View File

@@ -32,8 +32,6 @@ set(LIB
${OSL_LIBRARIES}
${OPENIMAGEIO_LIBRARIES}
${PUGIXML_LIBRARIES}
${CLANG_LIBRARIES}
${LLVM_LIBRARY}
)
if(APPLE)