[libcxx-commits] [PATCH] D155560: [libcxx] Allow linking against the MSVC static CRT

Andrew Ng via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 20 04:03:21 PDT 2023


andrewng added a comment.

>> although I slightly prefer my patch where it would be possible to build both the shared and static versions of `libcxx`. However, this patch is more simple which is good too.
>
> Yeah, this is very simple at least. If strictly needed, we can add options later. But due to the dllimport attributes in headers, you can’t really use a build of both static and shared anyway, unless users define the macro for disabling visibility before including libcxx headers.

That's basically how I manually switched between "static" and "shared" builds by disabling the "visibility" since I already had to manually add the include paths for the `libcxx` headers. Ideally, the `clang-cl` driver would sort this all out based on selected "runtime" type and use of `libcxx`. But this support is still missing, along with the issues related to `compiler-rt`. It's very much DIY at the moment...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155560



More information about the libcxx-commits mailing list