[libc-commits] [libc] [llvm] [libc] Decouple LIBC_ASSERT failure handling and raise SIGABRT in full-build mode (PR #239277)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Wed Nov 11 00:53:46 PST 2026


https://github.com/labath requested changes to this pull request.

Thank you for looking at this @SchrodingerZhu.

The code looks good, but I don't think it's in the right place. I believe internal::assert_fail should be defined in support, just like `internal::exit` is (src/__support/OSUtil/exit.h, with implementations in os-specific subfolders). The current version makes the change in libc/cmake/modules/LLVMLibCTestRules.cmake look even more dubious now, as the code does not actually depend on the __assert_fail entrypoint -- it depends on the internal function, which just happens to be defined in the same file. That's exactly the thing we're trying to avoid with this setup -- pulling in an unrequested entry point just because some code is depending on a function defined in the same translation unit.

After that, we can also try the two-library setup I mentioned in the previous comment. We may run into the problem where our build requires (sometimes?) targets to be declared in dependency order. If that turns out to be the case, we can think about what to do about it...

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


More information about the libc-commits mailing list