Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-10-06 18:35:48 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-10-06 18:35:48 +0400
commit2ecb4781a7634b7e95c7426c0f15e98abafee4a5 (patch)
treeb66573033e158c01f381b1e7ce3b221b441dfc90 /CMakeLists.txt
parent1e2f475512e5d5614078a6154cfd38a0e05fa6ea (diff)
Fix for incomplete loading of liboslexec static library. This is needed in order to provide the osl_allocate_closure_component function for LLVM.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e031d0358e..dc90f962968 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -770,8 +770,9 @@ if(UNIX AND NOT APPLE)
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
- # WARNING! depends on correct order of OSL libs linking
- list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
+ # Note: --whole-archive is needed to force loading of all symbols in liboslexec,
+ # otherwise LLVM is missing the osl_allocate_closure_component function
+ list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -Wl,--whole-archive ${OSL_LIB_EXEC} -Wl,--no-whole-archive ${OSL_LIB_QUERY})
find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)