[libcxx] [test] Avoid spurious test breakage in clang-cl-dll configs with newer CMake

The pointer.volatile.pass.cpp test was already marked as XFAIL for
mingw-dll (for reasons explained in the comment above it).

The same issue also appears in clang-cl-dll when built with newer
CMake versions. (It didn't appear with older versions of CMake, as
CMake built the library with the clang-cl flag `-std:c++latest` when
we've requested C++ 20 - which practically built it in c++2b mode with
current clang versions. With current versions of CMake, it passes
`-std:c++20` instead.)

As it succeeds/fails dependent on factors we don't
directly control, mark it as UNSUPPORTED instead of XFAIL.

Differential Revision: https://reviews.llvm.org/D122718
This commit is contained in:
Martin Storsjö 2022-03-30 13:34:02 +03:00
parent 64d7f778e6
commit b048397db8
1 changed files with 13 additions and 3 deletions

View File

@ -10,12 +10,22 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// This test fails on MinGW DLL configurations, due to
// This test fails in Windows DLL configurations, due to
// __exclude_from_explicit_instantiation__ not behaving as it should in
// combination with dllimport (https://llvm.org/PR41018), in combination
// with running tests in c++2b mode while building the library in c++20 mode.
// (If the library was built in c++2b mode, this test would succeed.)
// XFAIL: target={{.+}}-windows-gnu && windows-dll
//
// If the library was built in c++2b mode, this test would succeed.
//
// Older CMake passed -std:c++latest to set C++ 20 mode on clang-cl, which
// hid this issue. With newer CMake versions, it passes -std:c++20 which
// makes this fail.
//
// Marking as UNSUPPORTED instead of XFAIL to avoid spurious failures/successes
// depending on the version of CMake used.
// TODO: Remove this when the library is built in c++2b mode.
//
// UNSUPPORTED: windows-dll
// template <class charT, class traits = char_traits<charT> >
// class basic_ostream;