[libcxx-commits] [libcxx] [libcxx][FreeBSD] Ship trivial copy ctor in FreeBSD 16 (PR #216347)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 14 09:16:45 PDT 2026


https://github.com/aokblast created https://github.com/llvm/llvm-project/pull/216347

None

>From 3b36581d5ebb3605f751a0a94181a660144f3112 Mon Sep 17 00:00:00 2001
From: ShengYi Hung <aokblast at FreeBSD.org>
Date: Fri, 14 Aug 2026 23:36:12 +0800
Subject: [PATCH] [libcxx][FreeBSD] Ship trivial copy ctor in FreeBSD 16

---
 libcxx/include/__configuration/abi.h                            | 2 +-
 libcxx/include/__cxx03/__configuration/abi.h                    | 2 +-
 .../utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp     | 2 --
 .../utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp     | 2 --
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/libcxx/include/__configuration/abi.h b/libcxx/include/__configuration/abi.h
index 757ba69cb17b4..cf05272d67111 100644
--- a/libcxx/include/__configuration/abi.h
+++ b/libcxx/include/__configuration/abi.h
@@ -83,7 +83,7 @@
 #elif _LIBCPP_ABI_VERSION == 1
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
-#  if defined(__FreeBSD__)
+#  if __FreeBSD__ < 16
 #    define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 #  endif
 #endif
diff --git a/libcxx/include/__cxx03/__configuration/abi.h b/libcxx/include/__cxx03/__configuration/abi.h
index 56ebe520f65a0..8a91907061f66 100644
--- a/libcxx/include/__cxx03/__configuration/abi.h
+++ b/libcxx/include/__cxx03/__configuration/abi.h
@@ -116,7 +116,7 @@
 #  endif
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
-#  if defined(__FreeBSD__)
+#  if __FreeBSD__ < 16
 #    define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 #  endif
 #endif
diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp
index 1dafb10ce1f42..896c08b16f286 100644
--- a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp
+++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp
@@ -12,8 +12,6 @@
 
 // Test that we properly provide the trivial copy operations by default.
 
-// FreeBSD still provides the old ABI for std::pair.
-// XFAIL: freebsd
 // ADDITIONAL_COMPILE_FLAGS: -Wno-invalid-offsetof
 
 #include <utility>
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp
index 3ec60c08b8eab..725c81bbb76b4 100644
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp
@@ -12,8 +12,6 @@
 
 // Test that we properly provide the trivial copy operations by default.
 
-// FreeBSD still provides the old ABI for std::pair.
-// XFAIL: freebsd
 // ADDITIONAL_COMPILE_FLAGS: -Wno-invalid-offsetof
 
 #include <utility>



More information about the libcxx-commits mailing list