summaryrefslogtreecommitdiffstats
path: root/libunwind/src
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-01-30 19:27:26 +0000
committerPetr Hosek <phosek@chromium.org>2019-01-30 19:27:26 +0000
commitb9128d8def879775838876af43592da01ecbc18d (patch)
treef65056a87200ab2429ea6c09b429015d53363f6a /libunwind/src
parentc71e996aed8143ea6d27ee49b5caee07db48a031 (diff)
downloadbcm5719-llvm-b9128d8def879775838876af43592da01ecbc18d.tar.gz
bcm5719-llvm-b9128d8def879775838876af43592da01ecbc18d.zip
[CMake] Use correct visibility for linked libraries in CMake
When linking library dependencies, we shouldn't need to export linked libraries to dependents. We should be explicit about this in target_link_libraries, otherwise other targets that depend on these such as sanitizers get repeated (and possibly even conflicting) dependencies. Differential Revision: https://reviews.llvm.org/D57456 llvm-svn: 352654
Diffstat (limited to 'libunwind/src')
-rw-r--r--libunwind/src/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 080e8c5ad58..2928a14dea0 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -146,7 +146,7 @@ if (LIBUNWIND_ENABLE_SHARED)
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 @@ endif()
# 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}"
OpenPOWER on IntegriCloud