smeenai added a comment.

Super late to the party here, sorry.

I don't understand why the type of linking needs to be changed depending on if 
the library is static or shared. If a static library A depends on a static 
library B as PRIVATE, and then executable C links to A, CMake will make sure 
the link line for A also includes C; you don't need INTERFACE or PUBLIC for 
that. https://cmake.org/pipermail/cmake/2016-May/063400.html has a good 
explanation of what the different link types mean for static libraries.



================
Comment at: clang/cmake/modules/AddClang.cmake:182
+  if(${TARGET_TYPE} EQUAL "STATIC_LIBRARY")
+    set(type INTERFACE)
+  endif()
----------------
Note that D74106 changes the corresponding logic in llvm_add_library to PUBLIC 
for this case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67321



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to