[libcxx-commits] [PATCH] D150825: [libcxxabi] allow downstreams to override _LIBCPP_VERBOSE_ABORT

Nick Desaulniers via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 17 15:50:16 PDT 2023


nickdesaulniers created this revision.
nickdesaulniers added reviewers: asbirlea, vitalybuka, ldionne.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

@asbirlea reports that Google does this for sanitizer analysis
downstream. Looks like a few #defines are added into a header which is
then injected into the build.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150825

Files:
  libcxxabi/src/demangle/DemangleConfig.h


Index: libcxxabi/src/demangle/DemangleConfig.h
===================================================================
--- libcxxabi/src/demangle/DemangleConfig.h
+++ libcxxabi/src/demangle/DemangleConfig.h
@@ -11,9 +11,12 @@
 #ifndef LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H
 #define LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H
 
-// Must be defined before pulling in headers from libc++.
+// Must be defined before pulling in headers from libc++. Allow downstream
+// build systems to override this value.
 // https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode
+#ifndef _LIBCPP_VERBOSE_ABORT
 #define _LIBCPP_VERBOSE_ABORT(...) abort_message(__VA_ARGS__)
+#endif
 
 #include "../abort_message.h"
 #include <ciso646>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150825.523200.patch
Type: text/x-patch
Size: 721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230517/ce395805/attachment.bin>


More information about the libcxx-commits mailing list