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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-17 11:26:51 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-17 11:26:51 +0300
commit2aa497661f7b79d9c8f31fad31cca070bed250d1 (patch)
treedf729e27be4939f1f6b2e3648b02cf31bd5c1d0c /build_files
parent684b5172ff4dbbcad2d33a3b0fae7181bcbd00b6 (diff)
parent554f861ac11a308e3f00f1cd55d4c9e76015b7ad (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 64089fd3406..23ed5b6cbfb 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -416,6 +416,17 @@ function(setup_liblinks
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
+ # Work around undefined reference errors when disabling certain libraries.
+ # Finding the right order for all combinations of options is too hard, so
+ # we use --start-group and --end-group so the linker does not discard symbols
+ # too early. This appears to have no significant performance impact.
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(
+ ${target}
+ -Wl,--start-group
+ )
+ endif()
+
# jemalloc must be early in the list, to be before pthread (see T57998)
if(WITH_MEM_JEMALLOC)
target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
@@ -592,6 +603,14 @@ function(setup_liblinks
# target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
+
+ # See comments above regarding --start-group.
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(
+ ${target}
+ -Wl,--end-group
+ )
+ endif()
endfunction()
macro(TEST_SSE_SUPPORT