[PATCH] D101479: [Driver] Support libc++ in MSVC

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 5 23:06:07 PDT 2021


mstorsjo added a comment.

In D101479#2740895 <https://reviews.llvm.org/D101479#2740895>, @phosek wrote:

> On other platforms the decision whether to use static or shared is controlled by `-static-libstdc++`, does CL have a similar flag or shall we support `-static-libstdc++` in MSVC driver as well?

Hmm, well contrary to how `-static-libstdc++` works otherwise (you only need it while linking), you'd need to define `-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS` everwhere when compiling, if libc++ defaults to DLL linkage but you'd want to use a static version instead.

Repeating the question - does the driver really need to know or care? Thanks to the autolinking directive in libc++ headers, the driver shouldn't need to explicitly link against the libc++ library at all?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101479



More information about the cfe-commits mailing list