[libcxx-commits] [PATCH] D135068: [libc++abi] Disable libc++ assertions when building cxa_demangle
Alexander Richardson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 3 02:35:37 PDT 2022
arichardson created this revision.
arichardson added reviewers: libc++abi, urnathan.
Herald added a project: All.
arichardson requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++abi.
Debug builds of libc++abi with libc++ assertions currently fail due to a
missing reference to __libcpp_verbose_abort(). This fixes the linker errors
by disabling the libc++-internal assertions while building this file.
I'm not convinced this is the best approach for fixing this problem, maybe
we should just provide a stub implementation of __libcpp_verbose_abort()
in this file instead.
Fixes: https://github.com/llvm/llvm-project/issues/58117
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135068
Files:
libcxxabi/src/cxa_demangle.cpp
Index: libcxxabi/src/cxa_demangle.cpp
===================================================================
--- libcxxabi/src/cxa_demangle.cpp
+++ libcxxabi/src/cxa_demangle.cpp
@@ -10,6 +10,11 @@
// file does not yet support:
// - C++ modules TS
+// We have to avoid any references to the libc++ dylib, so we
+// explicitly disable assertions here (as that could result in
+// a call to __libcpp_verbose_abort()).
+#define _LIBCPP_ENABLE_ASSERTIONS 0
+
#include "demangle/ItaniumDemangle.h"
#include "__cxxabi_config.h"
#include <cassert>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135068.464637.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221003/cdfa4167/attachment-0001.bin>
More information about the libcxx-commits
mailing list