Skip to content

Commit

Permalink
[CMake] Use PUBLIC link mode for static libraries
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
petrhosek authored and zmodem committed Mar 2, 2020
1 parent f5fd8a3 commit 499b169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 499b169

Please sign in to comment.