Skip to content

Commit 6843059

Browse files
ldionneAlexisPerry
authored andcommitted
[libc++] Build with -fsized-deallocation (llvm#96217)
This patch makes libc++ build with -fsized-deallocation. That flag is enabled by default in recent versions of Clang, so this patch will make libc++ forward-compatible with ToT Clang.
1 parent 0e98020 commit 6843059

6 files changed

+14
-5
lines changed

libcxx/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,10 @@ function(cxx_add_basic_build_flags target)
553553
target_add_compile_flags_if_supported(${target} PRIVATE -fvisibility=hidden)
554554
endif()
555555

556+
# Build with -fsized-deallocation, which is default in recent versions of Clang.
557+
# TODO(LLVM 21): This can be dropped once we only support Clang >= 19.
558+
target_add_compile_flags_if_supported(${target} PRIVATE -fsized-deallocation)
559+
556560
# Let the library headers know they are currently being used to build the
557561
# library.
558562
target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_LIBRARY)

libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,8 @@
20222022
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20232023
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20242024
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
2025-
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
2025+
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
2026+
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20262027
{'import_export': 'wIMP', 'is_defined': False, 'name': '_Znam', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20272028
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZnamSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20282029
{'import_export': 'wIMP', 'is_defined': False, 'name': '_Znwm', 'storage_mapping_class': 'DS', 'type': 'FUNC'}

libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,8 @@
20222022
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20232023
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20242024
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
2025-
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
2025+
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
2026+
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20262027
{'import_export': 'wIMP', 'is_defined': False, 'name': '_Znam', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20272028
{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZnamSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
20282029
{'import_export': 'wIMP', 'is_defined': False, 'name': '_Znwm', 'storage_mapping_class': 'DS', 'type': 'FUNC'}

libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
{'is_defined': False, 'name': '_ZdaPv', 'type': 'FUNC'}
4040
{'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'}
4141
{'is_defined': False, 'name': '_ZdlPv', 'type': 'FUNC'}
42-
{'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}
42+
{'is_defined': False, 'name': '_ZdlPvm', 'type': 'FUNC'}
43+
{'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'}
4344
{'is_defined': False, 'name': '_Znam', 'type': 'FUNC'}
4445
{'is_defined': False, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'}
4546
{'is_defined': False, 'name': '_Znwm', 'type': 'FUNC'}

libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
{'is_defined': False, 'name': '_ZdaPv', 'type': 'FUNC'}
4040
{'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'}
4141
{'is_defined': False, 'name': '_ZdlPv', 'type': 'FUNC'}
42-
{'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}
42+
{'is_defined': False, 'name': '_ZdlPvm', 'type': 'FUNC'}
43+
{'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'}
4344
{'is_defined': False, 'name': '_Znam', 'type': 'FUNC'}
4445
{'is_defined': False, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'}
4546
{'is_defined': False, 'name': '_Znwm', 'type': 'FUNC'}

libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
{'is_defined': False, 'name': '_ZdaPv', 'type': 'FUNC'}
1919
{'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'}
2020
{'is_defined': False, 'name': '_ZdlPv', 'type': 'FUNC'}
21-
{'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}
21+
{'is_defined': False, 'name': '_ZdlPvm', 'type': 'FUNC'}
22+
{'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'}
2223
{'is_defined': False, 'name': '_Znam', 'type': 'FUNC'}
2324
{'is_defined': False, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'}
2425
{'is_defined': False, 'name': '_Znwm', 'type': 'FUNC'}

0 commit comments

Comments
 (0)