[libcxx-commits] [PATCH] D100539: [libcxx] Base MSVC autolinking on _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 15 11:52:14 PDT 2021


mstorsjo added a comment.

In D100539#2692434 <https://reviews.llvm.org/D100539#2692434>, @rnk wrote:

> I see that libc++ appears to support building both static and dynamic libraries in the same build:
> https://github.com/llvm/llvm-project/blob/280678122d3175943e41310d56a17924ea38ffc1/libcxx/CMakeLists.txt#L89-L90
> That makes it impossible to bake this visibility setting into __config_site. Otherwise, I would suggest that we do that, and make the Windows behavior the cross-platform behavior. Then we would rename this macro to something like _LIBCPP_STATIC_LIBRARY or something like that.

libcxx actually already does bake `_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS` into `__config_site` if `LIBCXX_ENABLE_SHARED` isn't set.

And yes, while one _can_ build both static and shared at the same time, the static library can't really be used practically in such configs. But that's an orthogonal issue (that I'm not planning on doing anything about really, as there's no really neat solutions that I see).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100539



More information about the libcxx-commits mailing list