diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2024-06-24 17:26:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 17:26:03 -0400 |
commit | d2864d1716b5e5b5eabb3004b04a1d7f67803f0d (patch) | |
tree | bc2c9d4eb622199a37995a3fe559c4adb6cfad38 | |
parent | 3aef525aa4b9a5395b6ac4ae771e28e64b27a126 (diff) | |
download | llvm-d2864d1716b5e5b5eabb3004b04a1d7f67803f0d.zip llvm-d2864d1716b5e5b5eabb3004b04a1d7f67803f0d.tar.gz llvm-d2864d1716b5e5b5eabb3004b04a1d7f67803f0d.tar.bz2 |
[libc++] Build with -fsized-deallocation (#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.
6 files changed, 14 insertions, 5 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 4b92701..e098bd5 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -553,6 +553,10 @@ function(cxx_add_basic_build_flags target) target_add_compile_flags_if_supported(${target} PRIVATE -fvisibility=hidden) endif() + # Build with -fsized-deallocation, which is default in recent versions of Clang. + # TODO(LLVM 21): This can be dropped once we only support Clang >= 19. + target_add_compile_flags_if_supported(${target} PRIVATE -fsized-deallocation) + # Let the library headers know they are currently being used to build the # library. target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_LIBRARY) diff --git a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist index 7e223e6..033d9f9 100644 --- a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -2022,7 +2022,8 @@ {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} -{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_Znam', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZnamSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_Znwm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} diff --git a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist index 407d045..332d8ab 100644 --- a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -2022,7 +2022,8 @@ {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} -{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wIMP', 'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_Znam', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_ZnamSt11align_val_t', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wIMP', 'is_defined': False, 'name': '_Znwm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} diff --git a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist index 4022339..3458b33 100644 --- a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -39,7 +39,8 @@ {'is_defined': False, 'name': '_ZdaPv', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZdlPv', 'type': 'FUNC'} -{'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZdlPvm', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_Znam', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_Znwm', 'type': 'FUNC'} diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist index 574c450..bdf90ba 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -39,7 +39,8 @@ {'is_defined': False, 'name': '_ZdaPv', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZdlPv', 'type': 'FUNC'} -{'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZdlPvm', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_Znam', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_Znwm', 'type': 'FUNC'} diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist index 6655466..ac3cc12 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist @@ -18,7 +18,8 @@ {'is_defined': False, 'name': '_ZdaPv', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZdlPv', 'type': 'FUNC'} -{'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZdlPvm', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_Znam', 'type': 'FUNC'} {'is_defined': False, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'} {'is_defined': False, 'name': '_Znwm', 'type': 'FUNC'} |