[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51116] trunk/blender/CMakeLists.txt: Fix for incomplete loading of liboslexec static library.
Lukas Toenne
lukas.toenne at googlemail.com
Sat Oct 6 16:35:48 CEST 2012
Revision: 51116
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51116
Author: lukastoenne
Date: 2012-10-06 14:35:48 +0000 (Sat, 06 Oct 2012)
Log Message:
-----------
Fix for incomplete loading of liboslexec static library. This is needed in order to provide the osl_allocate_closure_component function for LLVM.
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2012-10-06 14:08:26 UTC (rev 51115)
+++ trunk/blender/CMakeLists.txt 2012-10-06 14:35:48 UTC (rev 51116)
@@ -770,8 +770,9 @@
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)
More information about the Bf-blender-cvs
mailing list