[PATCH] D121141: [Clang] Add `-fexperimental-library` flag to enable unstable and experimental features: follow-up fixes

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 15 12:11:38 PDT 2022


mstorsjo added subscribers: phosek, hans, thakis, rnk.
mstorsjo added a comment.

In D121141#3655323 <https://reviews.llvm.org/D121141#3655323>, @ldionne wrote:

> The `experimental-library-flag` test is currently failing on Windows because on Windows, `-stdlib=libc++` seems to be ignored and we don't add `-lc++` or `-lc++experimental`. Does someone understand how things are supposed to work when using libc++ on Windows? @mstorsjo maybe?

Clarification - I presume it would fail when targeting MSVC, not when targeting mingw.

Yes, I think `-stdlib=libc++` has no effect on MSVC targets currently, and you have to add the include directory and lib arguments when using it - I think @rnk, @hans or @thakis can confirm that.

@phosek has a patch to take the option into use there too, but it's essentially blocked by D103947 <https://reviews.llvm.org/D103947> if I remember correctly. (The chain of dependencies that trigger that is a bit non-obvious, but I think it was the case that they build their Clang with `-DCLANG_DEFAULT_CXX_STDLIB=libc++`, and once that has an effect on the MSVC configs, a bunch of code in their build setup suddenly ends up using libc++ instead of MSVC STL, and there's a lot of code there that is built with `_HAS_EXCEPTIONS=0` - hence libc++ needing to work in that configuration.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121141



More information about the cfe-commits mailing list