[PATCH] D57456: [CMake] Use correct visibility for linked libraries in CMake
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 30 11:27:22 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL352654: [CMake] Use correct visibility for linked libraries in CMake (authored by phosek, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D57456?vs=184342&id=184343#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57456/new/
https://reviews.llvm.org/D57456
Files:
libcxx/trunk/lib/CMakeLists.txt
libcxxabi/trunk/src/CMakeLists.txt
libunwind/trunk/src/CMakeLists.txt
Index: libcxxabi/trunk/src/CMakeLists.txt
===================================================================
--- libcxxabi/trunk/src/CMakeLists.txt
+++ libcxxabi/trunk/src/CMakeLists.txt
@@ -189,7 +189,7 @@
if(COMMAND llvm_setup_rpath)
llvm_setup_rpath(cxxabi_shared)
endif()
- target_link_libraries(cxxabi_shared ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_SHARED_LIBRARIES})
+ target_link_libraries(cxxabi_shared PRIVATE ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_SHARED_LIBRARIES})
set_target_properties(cxxabi_shared
PROPERTIES
CXX_EXTENSIONS
@@ -226,7 +226,7 @@
endif()
endif()
add_library(cxxabi_static STATIC ${cxxabi_static_sources})
- target_link_libraries(cxxabi_static ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_STATIC_LIBRARIES})
+ target_link_libraries(cxxabi_static PRIVATE ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_STATIC_LIBRARIES})
set_target_properties(cxxabi_static
PROPERTIES
CXX_EXTENSIONS
Index: libunwind/trunk/src/CMakeLists.txt
===================================================================
--- libunwind/trunk/src/CMakeLists.txt
+++ libunwind/trunk/src/CMakeLists.txt
@@ -146,7 +146,7 @@
if(COMMAND llvm_setup_rpath)
llvm_setup_rpath(unwind_shared)
endif()
- target_link_libraries(unwind_shared ${libraries})
+ target_link_libraries(unwind_shared PRIVATE ${libraries})
set_target_properties(unwind_shared
PROPERTIES
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
@@ -162,7 +162,7 @@
# Build the static library.
if (LIBUNWIND_ENABLE_STATIC)
add_library(unwind_static STATIC ${unwind_static_sources})
- target_link_libraries(unwind_static ${libraries})
+ target_link_libraries(unwind_static PRIVATE ${libraries})
set_target_properties(unwind_static
PROPERTIES
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
Index: libcxx/trunk/lib/CMakeLists.txt
===================================================================
--- libcxx/trunk/lib/CMakeLists.txt
+++ libcxx/trunk/lib/CMakeLists.txt
@@ -241,7 +241,7 @@
if(COMMAND llvm_setup_rpath)
llvm_setup_rpath(cxx_shared)
endif()
- target_link_libraries(cxx_shared ${LIBCXX_LIBRARIES})
+ target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES})
set_target_properties(cxx_shared
PROPERTIES
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
@@ -265,7 +265,7 @@
# Build the static library.
if (LIBCXX_ENABLE_STATIC)
add_library(cxx_static STATIC ${cxx_static_sources})
- target_link_libraries(cxx_static ${LIBCXX_LIBRARIES})
+ target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES})
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set_target_properties(cxx_static
PROPERTIES
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57456.184343.patch
Type: text/x-patch
Size: 2799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190130/ac7c5565/attachment.bin>
More information about the llvm-commits
mailing list