[PATCH] D79059: Fix and re-submit D78534 - [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 5 22:37:49 PDT 2020
smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.
Sorry for the delayed review here.
I'm not the biggest fan of this cos it's encoding knowledge of `llvm_add_library`'s internal behavior (that it creates a `*_static` target if both STATIC and SHARED are passed) inside `add_clang_library`, so that if someone changes `llvm_add_library`, they might break `add_clang_library` without realizing it. However, it looks like a bunch of other places in the build also assume the `_static` suffix, so we already have that problem today, and this is fine.
================
Comment at: clang/cmake/modules/AddClang.cmake:107
+ if(ARG_SHARED AND ARG_STATIC)
+ set(libs ${name} ${name}_static)
endif()
----------------
Super nit: you can do `list(APPEND libs ${name}_static)` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79059/new/
https://reviews.llvm.org/D79059
More information about the cfe-commits
mailing list