[libcxx-commits] [libcxx] Simplify the __assertion_handler build logic. Be friendly to IDEs. (PR #93333)

Konstantin Varlamov via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 28 12:38:01 PDT 2024


var-const wrote:

@EricWF 
> Where are the requirements on the vendor override documented?

The best current documentation is at #92021 , but I don't think it goes into the level of detail you mention.

> Can it include other C++ or C headers? Must the implementation be header only?

It can include other headers as long as it doesn't create circular dependencies (which most standard includes would create). It doesn't need to be header-only.

> What vendors are currently using configuration knob?

For documentation purposes, I think that would go into too much detail. This was certainly welcomed by vendors when RFC was discussed.

> There are likely other idiomatic means to allow overriding the handler.

I can't (at least immediately) see a better way rather than providing an overridable macro; if that's the case, it becomes a question of finding a good way to override a macro. Using a custom header for the purpose is convenient because it allows doing includes, providing helper inline functions, etc., in a pretty natural way.

Taking a step back, how significant is the issue? This is a pretty low-level header that is not configurable by users, only vendors. I feel the vast majority of users would never have to interact with it (or even be aware of its existence). Even for vendors and library developers, I don't expect this to be a part of code that is being interacted with often.


https://github.com/llvm/llvm-project/pull/93333


More information about the libcxx-commits mailing list