[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards
Wang Pengcheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 27 00:46:32 PDT 2022
pcwang-thead added a comment.
In D112921#3474964 <https://reviews.llvm.org/D112921#3474964>, @rjmccall wrote:
> Hmm. Allowing a version on `-stdlib` is intuitively appealing, but I'm not sure it actually gives us the information we need. As I recall, `-stdlib` selects the high-level stdlib and not the low-level one, and those are related in code but not necessarily at runtime; for example, you can (or at least could, historically) use libstdc++ on macOS, but the underlying low-level stdlib is going to be libc++abi, not libsupc++. And the low-level runtime is the one that actually provides global `operator new` functions. Is there a way to bridge that gap?
Hmm, that's really a tough nut. We have high-level standard libraries like `libc++` and `libstdc++`, and low-level runtimes like `libc++abi`, `libsupc++` and libcxxrt <https://github.com/libcxxrt/libcxxrt>. There could be a lot of situations and we haven't think about MSVC yet.
I don't know if adding an option `-cxxabilib=libsupc++-v4.8` or something like this would make sense, but I think we should make another revision to do it. I will appy @ldionne 's solution first.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits