From 5ed58eda46760bee38e96683caac323f7de7b1fe Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Tue, 28 Nov 2023 19:08:09 +0100 Subject: [PATCH 1/3] [libc++] Reenable codecvt in the dylib. The header is used in the dylib, this is not an issue at the moment since the dylib is built using C++23. Post release comments in #72496 seem to indicate this removal is an issue for Fuchsia, this is a test so see whether it fixes the issue for their builds. --- libcxx/include/codecvt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt index 7a363280d5212..bdf4f7b6a201e 100644 --- a/libcxx/include/codecvt +++ b/libcxx/include/codecvt @@ -63,7 +63,7 @@ class codecvt_utf8_utf16 # pragma GCC system_header #endif -#if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) +#if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) _LIBCPP_BEGIN_NAMESPACE_STD @@ -555,7 +555,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) +#endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include From d254a7aab8f92754e5a0b10f33e01b988a346083 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 29 Nov 2023 17:31:21 +0100 Subject: [PATCH 2/3] Fixes Windows only tests in C++26. --- .../file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp | 1 + .../fstreams/fstream.members/open_wchar_pointer.pass.cpp | 1 + .../file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp | 1 + .../fstreams/ofstream.members/open_wchar_pointer.pass.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp index c78d4463ad5bc..c1563e3bf6190 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp @@ -16,6 +16,7 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters +// ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include #include diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp index 315062053dd76..2ec0378b5ba58 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp @@ -16,6 +16,7 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters +// ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include #include diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp index 0d9cab8e6007a..7941c9ed816e0 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp @@ -16,6 +16,7 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters +// ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include #include diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp index 0bc803a644802..d2fa733519bdb 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp @@ -16,6 +16,7 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters +// ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include #include From 8b85edb00863211c708dc29c5bf40a4b3c817c22 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 29 Nov 2023 17:59:16 -0500 Subject: [PATCH 3/3] Add comment explaining this is a temporary workaround --- .../file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp | 2 ++ .../fstreams/fstream.members/open_wchar_pointer.pass.cpp | 2 ++ .../file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp | 2 ++ .../fstreams/ofstream.members/open_wchar_pointer.pass.cpp | 2 ++ 4 files changed, 8 insertions(+) diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp index c1563e3bf6190..c2b23bba421bf 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp @@ -16,6 +16,8 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters + +// TODO: This should not be necessary // ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp index 2ec0378b5ba58..9a5564fa9e11c 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp @@ -16,6 +16,8 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters + +// TODO: This should not be necessary // ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp index 7941c9ed816e0..185ee9e5f96a3 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp @@ -16,6 +16,8 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters + +// TODO: This should not be necessary // ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp index d2fa733519bdb..9403643ad6ab6 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp @@ -16,6 +16,8 @@ // This extension is only provided on Windows. // REQUIRES: windows // UNSUPPORTED: no-wide-characters + +// TODO: This should not be necessary // ADDITIONAL_COMPILE_FLAGS:-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT #include