[libcxx-commits] [PATCH] D155560: [libcxx] Allow linking against the MSVC static CRT
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 20 05:14:09 PDT 2023
mstorsjo added a comment.
In D155560#4518237 <https://reviews.llvm.org/D155560#4518237>, @andrewng wrote:
>>> 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...
Yep - that's why it's probably best to keep things simple and not add more options than necessary for now. One can configure exactly what one wants anyway by doing two separate builds with `LIBCXX_ENABLE_SHARED=OFF` and `LIBCXX_ENABLE_STATIC=OFF`.
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