[libcxx-commits] [libcxx] [libc++] Reenable codecvt in the dylib. (PR #73679)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 29 08:31:56 PST 2023
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/73679
>From b6cfc7c4e22cac51449c726c5e8c42d03bd249d5 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Tue, 28 Nov 2023 19:08:09 +0100
Subject: [PATCH 1/2] [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 7a363280d52127c..bdf4f7b6a201ee0 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 <atomic>
>From e60378bf3e56769134882356d587e7369dfac972 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Wed, 29 Nov 2023 17:31:21 +0100
Subject: [PATCH 2/2] 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 c78d4463ad5bcbb..c1563e3bf6190b2 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 <fstream>
#include <cassert>
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 315062053dd765e..2ec0378b5ba5838 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 <fstream>
#include <cassert>
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 0d9cab8e6007a9e..7941c9ed816e02b 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 <fstream>
#include <cassert>
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 0bc803a6448027a..d2fa733519bdb9a 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 <fstream>
#include <cassert>
More information about the libcxx-commits
mailing list