[libcxx-commits] [libcxx] [llvm] Add C++23 stacktrace (P0881R7) (PR #136528)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 25 07:12:39 PDT 2025
================
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_STACKTRACE_CONFIG_H
+#define _LIBCPP_STACKTRACE_CONFIG_H
+
+#include <__config>
+#include <__config_site>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace __stacktrace {
+
+#if __has_include(<unwind.h>)
+# define _LIBCPP_STACKTRACE_COLLECT_UNWIND
+#endif
+
+#if defined(__APPLE__)
+# define _LIBCPP_STACKTRACE_MACOS
+#endif
+
+#if defined(__linux__)
+# define _LIBCPP_STACKTRACE_LINUX
+#endif
+
+#if __has_include(<spawn.h>) && _LIBCPP_STACKTRACE_ALLOW_TOOLS_AT_RUNTIME
+# define _LIBCPP_STACKTRACE_CAN_SPAWN_TOOLS
+#endif
+
+#if __has_include(<windows.h>) && __has_include(<dbghelp.h>) && __has_include(<psapi.h>)
----------------
R-Goc wrote:
Same goes for the other platforms
https://github.com/llvm/llvm-project/pull/136528
More information about the libcxx-commits
mailing list