[Lldb-commits] [PATCH] D16293: [cmake] Make dependencies of lldb libraries private
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 21 07:27:42 PST 2016
labath updated this revision to Diff 45529.
labath added a comment.
Use private keyword for linux only
http://reviews.llvm.org/D16293
Files:
cmake/modules/AddLLDB.cmake
tools/argdumper/CMakeLists.txt
Index: tools/argdumper/CMakeLists.txt
===================================================================
--- tools/argdumper/CMakeLists.txt
+++ tools/argdumper/CMakeLists.txt
@@ -1,8 +1,16 @@
+include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
+
add_lldb_executable(lldb-argdumper
argdumper.cpp
)
-target_link_libraries(lldb-argdumper liblldb)
+if (LLDB_LINKER_SUPPORTS_GROUPS)
+ target_link_libraries(lldb-argdumper -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
+else()
+ target_link_libraries(lldb-argdumper ${LLDB_USED_LIBS})
+endif()
+llvm_config(lldb-argdumper ${LLVM_LINK_COMPONENTS})
+
install(TARGETS lldb-argdumper
RUNTIME DESTINATION bin)
Index: cmake/modules/AddLLDB.cmake
===================================================================
--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -4,7 +4,11 @@
endif()
if(${targetkind} MATCHES "SHARED")
- set(LINK_KEYWORD ${cmake_2_8_12_PUBLIC})
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(LINK_KEYWORD ${cmake_2_8_12_PRIVATE})
+ else()
+ set(LINK_KEYWORD ${cmake_2_8_12_PUBLIC})
+ endif()
endif()
if(${targetkind} MATCHES "SHARED" OR ${targetkind} MATCHES "EXE")
@@ -62,10 +66,10 @@
if (PARAM_SHARED)
if (LLDB_LINKER_SUPPORTS_GROUPS)
- target_link_libraries(${name} ${cmake_2_8_12_PUBLIC}
+ target_link_libraries(${name} ${cmake_2_8_12_PRIVATE}
-Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)
else()
- target_link_libraries(${name} ${cmake_2_8_12_PUBLIC} ${CLANG_USED_LIBS})
+ target_link_libraries(${name} ${cmake_2_8_12_PRIVATE} ${CLANG_USED_LIBS})
endif()
endif()
llvm_config(${name} ${LLVM_LINK_COMPONENTS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16293.45529.patch
Type: text/x-patch
Size: 1752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160121/78742087/attachment.bin>
More information about the lldb-commits
mailing list