[PATCH] D74106: [CMake] Use PUBLIC link mode for static libraries

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 29 11:10:17 PST 2020


phosek added a comment.

In D74106#1862689 <https://reviews.llvm.org/D74106#1862689>, @smeenai wrote:

> Ah, right, I forgot that "linking" includes header dependencies and so on. This makes sense.
>
> Not this diff, but won't a `BUILD_SHARED_LIBS` build still have issues here, since then `Support` will only have a `PRIVATE` dependency on `ZLIB::ZLIB` and libraries which depend on `Support` won't get that dependency? (And if that's not a problem, then I'm wondering why the static case needs to be `PUBLIC` instead of `PRIVATE`.)


That should be fine since only `Support` needs that dependency, not its dependents as zlib API isn't exposed across the `Support` API/ABI boundary.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74106/new/

https://reviews.llvm.org/D74106





More information about the llvm-commits mailing list