Commit 499b1699 authored by Petr Hosek's avatar Petr Hosek Committed by Hans Wennborg
Browse files

[CMake] Use PUBLIC link mode for static libraries

Using INTERFACE prevents the use of imported libraries as we've done
in 00b3d49d 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 50a6d3a6)
parent f5fd8a37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)