Skip to content

Commit 499b169

Browse files
petrhosekzmodem
authored andcommitted
[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 50a6d3a)
1 parent f5fd8a3 commit 499b169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ function(llvm_add_library name)
602602
endif()
603603

604604
if(ARG_STATIC)
605-
set(libtype INTERFACE)
605+
set(libtype PUBLIC)
606606
else()
607607
# We can use PRIVATE since SO knows its dependent libs.
608608
set(libtype PRIVATE)

0 commit comments

Comments
 (0)