llvm-project/libcxx
Louis Dionne 9b40ee8eb0 [libc++] Define new/delete in libc++abi only by default
Previously, we would define new/delete in both libc++ and libc++abi.
Not only does this cause code bloat, but also it's technically an ODR
violation since we don't know which operator will be selected. Furthermore,
since those are weak definitions, we should strive to have as few of them
as possible (to improve load times).

My preferred choice would have been to put the operators in libc++ only
by default, however that would create a circular dependency between
libc++ and libc++abi, which GNU linkers don't handle.

Folks who want to ship new/delete in libc++ instead of libc++abi are
free to do so by turning on LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS at
CMake configure time.

On Apple platforms, this shouldn't be an ABI break because we re-export
the new/delete symbols from libc++abi. This change actually makes libc++
behave closer to the system libc++ shipped on Apple platforms.

On other platforms, this is an ABI break for people linking against libc++
but not libc++abi. However, vendors have been consulted in D68269 and no
objection was raised. Furthermore, the definitions can be controlled to
appear in libc++ instead with the CMake option.

Differential Revision: https://reviews.llvm.org/D68269
2020-10-19 11:35:01 -04:00
..
benchmarks [libc++] Add a benchmark for std::map operations 2020-09-15 12:09:29 -04:00
cmake [libc++] Define new/delete in libc++abi only by default 2020-10-19 11:35:01 -04:00
docs [libc++] Define new/delete in libc++abi only by default 2020-10-19 11:35:01 -04:00
fuzzing [libc++] Tolerate NaN returning random distributions for now 2019-12-12 17:11:13 -05:00
include [libc++] Reduce dependencies on <iostream> from <random> 2020-10-15 13:40:18 -04:00
lib [libc++] Define new/delete in libc++abi only by default 2020-10-19 11:35:01 -04:00
src [libc++] Define new/delete in libc++abi only by default 2020-10-19 11:35:01 -04:00
test [libc++][test] Portably silence warnings 2020-10-19 08:33:58 -07:00
utils [libc++][dsl] Run checks for locale names aliases using a single %exec 2020-10-18 18:17:50 +01:00
www [libc++] Re-apply fdc41e11f (LWG1203) without breaking the C++11 build 2020-09-23 08:56:00 -04:00
.clang-format
.gitignore [libcxx] Fix .gitignore to not exclude test directories 2020-03-25 17:52:23 -07:00
CMakeLists.txt [libc++] Define new/delete in libc++abi only by default 2020-10-19 11:35:01 -04:00
CREDITS.TXT [libcxx] Adds [concept.same] 2020-04-08 18:00:13 -04:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
NOTES.TXT
TODO.TXT [libc++][NFC] Remove outdated TODO item 2020-07-08 13:04:33 -04:00
appveyor-reqs-install.cmd Attempt to upgrade compiler used by appveyor builds 2019-04-03 20:40:01 +00:00
appveyor.yml disable appveyor config for MSVC 2015 2019-04-03 20:36:51 +00:00