Commit 50a6d3a6 authored by Petr Hosek's avatar Petr Hosek
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
parent 7e9747b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -607,7 +607,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)