[libcxx-commits] [PATCH] D60176: [libc++][libc++abi] Don't provide new/delete when built with ASan, HWASan or TSan

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 3 15:56:56 PDT 2019


phosek added a comment.

In D60176#1454066 <https://reviews.llvm.org/D60176#1454066>, @ldionne wrote:

> In D60176#1454062 <https://reviews.llvm.org/D60176#1454062>, @ldionne wrote:
>
> > The right thing to do seems to be to provide `-DLIBCXX_ENABLE_NEW_DELETE_DEFINITIONS=OFF` when you configure libc++.
>
>
> What I mean here is that I don't see the justification for hardcoding this into the sources. Similarly, I find it wrong for this to be dependent on `_LIBCPP_ABI_VCRUNTIME` and `__GLIBCXX__`.


I've changed the implementation to make those independent. D60235 <https://reviews.llvm.org/D60235> is the alternative that relies entirely on CMake and only disables those for Fuchsia. IMO the problem with that solution is that anyone who builds libc++/libc++abi will need to apply the same solution. I was also thinking about changing the CMake option default, but there's no easy way to detect whether the sanitizer is being enabled e.g. through `CFLAGS`/`LDFLAGS`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60176/new/

https://reviews.llvm.org/D60176





More information about the libcxx-commits mailing list