[PATCH] D74106: [CMake] Use PUBLIC link mode for static libraries
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 19:12:12 PST 2020
phosek created this revision.
phosek added reviewers: compnerd, smeenai.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
Using INTERFACE prevents the use of imported libraries as we've done
in 00b3d49 <https://reviews.llvm.org/rG00b3d49d3a86490f0596100b23cd2c3a49334c75> 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74106
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -602,7 +602,7 @@
endif()
if(ARG_STATIC)
- set(libtype INTERFACE)
+ set(libtype PUBLIC)
else()
# We can use PRIVATE since SO knows its dependent libs.
set(libtype PRIVATE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74106.242802.patch
Type: text/x-patch
Size: 383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/49bd5d4d/attachment.bin>
More information about the llvm-commits
mailing list