[libc-commits] [libc] [libc][annex_k] Add abort_handler_s. (PR #164089)
Victor Campos via libc-commits
libc-commits at lists.llvm.org
Thu May 7 08:23:50 PDT 2026
================
@@ -0,0 +1,20 @@
+//===-- Implementation for abort_handler_s ----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/stdlib/abort_handler_s.h"
+#include "src/__support/annex_k/abort_handler_s.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(void, abort_handler_s,
+ (const char *__restrict msg, void *__restrict ptr,
+ errno_t error)) {
+ return annex_k::abort_handler_s(msg, ptr, error);
----------------
vhscampos wrote:
Thanks for the reply.
I think the dependence on a public api is indeed problematic. From what I understand, the abort handler should depend on a proxy header for the `abort` function. For this you need to create a new proxy header `hdr/func/abort.h` that uses LLVM libc's abort function if in full build mode, else the system's stdlib (in overlay mode).
Does it make sense?
https://github.com/llvm/llvm-project/pull/164089
More information about the libc-commits
mailing list