summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2020-02-05 19:07:43 -0800
committerHans Wennborg <hans@chromium.org>2020-03-02 10:59:49 +0100
commit499b1699621eb0aed9bec7017c1db60ccad30ae4 (patch)
tree143be175fb5e713b574a4f095a13731932f73cce /llvm/cmake/modules
parentf5fd8a37c18439102eb30c85dadac68c260a1a0d (diff)
downloadbcm5719-llvm-499b1699621eb0aed9bec7017c1db60ccad30ae4.tar.gz
bcm5719-llvm-499b1699621eb0aed9bec7017c1db60ccad30ae4.zip
[CMake] Use PUBLIC link mode for static libraries
Using INTERFACE prevents the use of imported libraries as we've done in 00b3d49 because these aren't linked against the target, they're only made part of the interface. This doesn't affect the output since static libraries aren't being linked into, but it enables the use of imported libraries. Differential Revision: https://reviews.llvm.org/D74106 (cherry picked from commit 50a6d3a6486d81d21a2c31ce8522321e19bed35e)
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 8d674f93542..fd69786544a 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -602,7 +602,7 @@ function(llvm_add_library name)
endif()
if(ARG_STATIC)
- set(libtype INTERFACE)
+ set(libtype PUBLIC)
else()
# We can use PRIVATE since SO knows its dependent libs.
set(libtype PRIVATE)
OpenPOWER on IntegriCloud