[libcxx-commits] [libcxx] [WIP][libc++] Fixes basic_streambuf instantiation. (PR #70963)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 1 10:25:08 PDT 2023


https://github.com/mordante created https://github.com/llvm/llvm-project/pull/70963

The patch https://reviews.llvm.org/D156609 fails in the CI [1] due to linker issues of

std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int)

This is the only virtual function in this class marked _LIBCPP_HIDE_FROM_ABI_VIRTUAL causing the function not to be instantiated in the dylib.

[1] https://buildkite.com/llvm-project/libcxx-ci/builds/31253#018b8227-8bdb-4f77-b578-f6ef9f14d7de

>From 5444aeafa863a6b7560d3e0ed90ebaf441fdb725 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Wed, 1 Nov 2023 18:19:27 +0100
Subject: [PATCH] [WIP][libc++] Fixes basic_streambuf instantiation.

The patch https://reviews.llvm.org/D156609 fails in the CI [1] due to
linker issues of

std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int)

This is the only virtual function in this class marked
_LIBCPP_HIDE_FROM_ABI_VIRTUAL causing the function not to be
instantiated in the dylib.

[1] https://buildkite.com/llvm-project/libcxx-ci/builds/31253#018b8227-8bdb-4f77-b578-f6ef9f14d7de
---
 libcxx/include/sstream       | 2 +-
 libcxx/utils/ci/run-buildbot | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 4fec465d5748009..45c58bff090b2d8 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -448,7 +448,7 @@ protected:
     int_type overflow (int_type __c = traits_type::eof()) override;
     pos_type seekoff(off_type __off, ios_base::seekdir __way,
                      ios_base::openmode __wch = ios_base::in | ios_base::out) override;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
+//    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
     pos_type seekpos(pos_type __sp,
                      ios_base::openmode __wch = ios_base::in | ios_base::out) override {
         return seekoff(__sp, ios_base::beg, __wch);
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index ebb255243ba9c15..4ac018c6a6939d9 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -320,6 +320,7 @@ generic-gcc)
                    -DLIBCXXABI_ENABLE_WERROR=NO \
                    -DLIBUNWIND_ENABLE_WERROR=NO
     check-runtimes
+    check-abi-list
 ;;
 generic-gcc-cxx11)
     clean



More information about the libcxx-commits mailing list