Backport another libc++ patch for std::filesystem (and locale) usage
This fixes linking against a DLL of libc++ while using the common headers (generated from the static version of the library, but which work for both shared and static versions) when calling e.g. std::filesystem::u8path.
This commit is contained in:
1 parent
168cc5f53d
commit
657d12c8a5
25 files changed
+122
-24
No files matched your search
@@ -0,0 +1,98 @@
|
||||
From 138e1609764e2226938df8cd6176303b41e4f325 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
|
||||
Date: Tue, 18 May 2021 14:45:08 +0000
|
||||
Subject: [PATCH 25/25] [libcxx] Make the visibility attributes consistent for
|
||||
__narrow_to_utf8/__widen_from_utf8
|
||||
|
||||
Use the same visiblity attributes as for all other template
|
||||
specializations in the same file; declare the specialization itself
|
||||
using _LIBCPP_TYPE_VIS, and don't use _LIBCPP_EXPORTED_FROM_ABI on
|
||||
the destructor. Methods that are excluded from the ABI are marked
|
||||
with _LIBCPP_INLINE_VISIBILITY.
|
||||
|
||||
This makes the vtable exported from DLL builds of libc++. Practically,
|
||||
it doesn't make any difference for the CI configuration, but it
|
||||
can make a difference in mingw setups.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D102717
|
||||
|
||||
(cherry picked from commit 3a6be27978aa3e83e9dc2ff2402b2569ce0686fd)
|
||||
---
|
||||
libcxx/include/__locale | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/libcxx/include/__locale b/libcxx/include/__locale
|
||||
index 77e5faab2676..c2800e88e8d2 100644
|
||||
--- a/libcxx/include/__locale
|
||||
+++ b/libcxx/include/__locale
|
||||
@@ -1484,14 +1484,14 @@ struct __narrow_to_utf8<8>
|
||||
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
template <>
|
||||
-struct _LIBCPP_TEMPLATE_VIS __narrow_to_utf8<16>
|
||||
+struct _LIBCPP_TYPE_VIS __narrow_to_utf8<16>
|
||||
: public codecvt<char16_t, char, mbstate_t>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__narrow_to_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
|
||||
- _LIBCPP_EXPORTED_FROM_ABI ~__narrow_to_utf8();
|
||||
+ ~__narrow_to_utf8();
|
||||
|
||||
template <class _OutputIterator, class _CharT>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1520,14 +1520,14 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
template <>
|
||||
-struct _LIBCPP_TEMPLATE_VIS __narrow_to_utf8<32>
|
||||
+struct _LIBCPP_TYPE_VIS __narrow_to_utf8<32>
|
||||
: public codecvt<char32_t, char, mbstate_t>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__narrow_to_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
|
||||
- _LIBCPP_EXPORTED_FROM_ABI ~__narrow_to_utf8();
|
||||
+ ~__narrow_to_utf8();
|
||||
|
||||
template <class _OutputIterator, class _CharT>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1578,14 +1578,14 @@ struct __widen_from_utf8<8>
|
||||
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
template <>
|
||||
-struct _LIBCPP_TEMPLATE_VIS __widen_from_utf8<16>
|
||||
+struct _LIBCPP_TYPE_VIS __widen_from_utf8<16>
|
||||
: public codecvt<char16_t, char, mbstate_t>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__widen_from_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
|
||||
- _LIBCPP_EXPORTED_FROM_ABI ~__widen_from_utf8();
|
||||
+ ~__widen_from_utf8();
|
||||
|
||||
template <class _OutputIterator>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1614,14 +1614,14 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
template <>
|
||||
-struct _LIBCPP_TEMPLATE_VIS __widen_from_utf8<32>
|
||||
+struct _LIBCPP_TYPE_VIS __widen_from_utf8<32>
|
||||
: public codecvt<char32_t, char, mbstate_t>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__widen_from_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
|
||||
- _LIBCPP_EXPORTED_FROM_ABI ~__widen_from_utf8();
|
||||
+ ~__widen_from_utf8();
|
||||
|
||||
template <class _OutputIterator>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in new issue
Block a user