Skip to content

Commit 50a6d3a

Browse files
committed
[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
1 parent 7e9747b commit 50a6d3a

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
@@ -607,7 +607,7 @@ function(llvm_add_library name)
607607
endif()
608608

609609
if(ARG_STATIC)
610-
set(libtype INTERFACE)
610+
set(libtype PUBLIC)
611611
else()
612612
# We can use PRIVATE since SO knows its dependent libs.
613613
set(libtype PRIVATE)

0 commit comments

Comments
 (0)