[libcxx-commits] [libcxx] [libc++][modules] Adds module testing. (PR #76246)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 22 08:20:01 PST 2024
mstorsjo wrote:
> > Thanks for reapplying the patch. It sounds very scary when libc++ finds headers of the Windows SDK. This means our test suite does not test libc++ but libc++ and the different implementation. @ldionne is this something libc++ officially supports or should support? I don't expect we test this in our pre-commit CI.
>
> No, I don't think that's a configuration we intend to support. I'm surprised that this is how we run the tests on Windows. @mstorsjo would have more context though, this might be necessary for us to find some of the Windows SDK headers.
Actually, this is exactly how we already run our tests right now.
In MSVC-like configurations (contrary to mingw), the MSVC STL headers are available directly in one of the main include directories that we strictly need to have available. In Unix, it's the same as if `<spanstream>` would be installed directly in `/usr/include` - there's no way around it (nothing like `-nostdinc++` which would drop a `<sysroot>/include/c++` directory, as it's all directly in `<sysroot>/include`).
The main difference, I believe, is that our CI runners have a slightly older install of MSVC, that lacks `<spanstream>` and `<stacktrace>`. It seems like `<spanstream>` is present since MSVC 2022 17.1, and `<stacktrace>` since MSVC 2022 17.4.
>From the point of view of a libc++ user on top of MSVC, that makes it quite problematic to use `__has_include()` or similar, as we don't know if we're picking up libc++ or MSVC STL headers.
https://github.com/llvm/llvm-project/pull/76246
More information about the libcxx-commits
mailing list