[libcxx-commits] [PATCH] D68269: [libc++abi] Do not define new/delete by default
Nico Weber via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 4 12:50:47 PDT 2019
thakis added a comment.
In D68269#1695143 <https://reviews.llvm.org/D68269#1695143>, @ldionne wrote:
> So, the problem with this patch as it stands is that it introduces a link-time dependency from libc++abi back to libc++, because libc++abi needs the definition of `new` and `delete` (which would be in libc++ only with this patch). This is what I'm working around in the tests by re-adding `-lc++` after `-lc++abi` on the compiler command line. This isn't a problem on Apple platforms IIUC since the order of command-line `-l<xxx>` arguments doesn't matter, but it does for linkers on most other platforms.
We (Chromium) currently statically link libc++ on all platforms, but use the platform default abi library. If I read the thread here right, this means we currently get operator new from libc++ but going forward we'd get it from the platform abi libraries -- but at the moment none (except darwin) have it yet. So that'd likely be an issue for us.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68269/new/
https://reviews.llvm.org/D68269
More information about the libcxx-commits
mailing list