[libcxx-commits] [PATCH] D119969: [libc++] Unconditionally provide the ability for users to enable assertions

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 16 12:51:54 PST 2022


ldionne added a comment.

Note that we could have interesting design discussions:

1. Is it really necessary to allow setting the "assertion handler" at runtime, i.e. couldn't we get rid of `__libcpp_set_debug_function` and just always call `abort()`?
2. Why don't we change the name of `__libcpp_debug_function` & friends to be more like `__libcpp_assertion_handler`?

Since the debug mode has been shipping in the LLVM release, my assumption is that people might have been enabling assertions and expecting ABI stability, which would be fair. If we make any of the changes above, we would break that.

As you might guess, my main goal is to eventually be able to enable assertions on Apple platforms, which isn't supported right now (we build our dylib with `LIBCXX_ENABLE_DEBUG_MODE_SUPPORT=OFF`). Technically, these ABI breaks would not impact us because we haven't been shipping those symbols, however they would impact users on other platforms. That's why I've decided to avoid going down that route so far.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119969



More information about the libcxx-commits mailing list