[libcxx-commits] [PATCH] D112215: [libcxx] [ci] Add CI configurations for MinGW

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 17 05:16:23 PST 2021


mstorsjo added a comment.

In D112215#3137336 <https://reviews.llvm.org/D112215#3137336>, @ldionne wrote:

>> (If the library too was built in C++2b mode, the issue wouldn't appear.)
>
> Oh really, do you know why?

As `__exclude_from_explicit_instantiation__` doesn't work as intended when dllimport/export is involved, it turns out that all the methods marked with that attribute actually do end up exported by the shared library. So the library built in C++20 mode lacks the method (as the method is only visible in C++2b mode), the test code in C++2b mode sees the new method and uses it (but expects an extern definition in the libc++ DLL due to the explicit template instantiation, as it doesn't honor `__exclude_from_explicit_instantiation__`).

If the library had been built in C++2b mode, the method would have existed in the library and been found there (even though the intent of the attribute was to use a local instantiation).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112215



More information about the libcxx-commits mailing list