[libcxxabi] r296136 - [libcxxabi] Disable calls to fprintf for baremetal targets.
Ranjeet Singh via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 24 08:43:36 PST 2017
Author: rsingh
Date: Fri Feb 24 10:43:36 2017
New Revision: 296136
URL: http://llvm.org/viewvc/llvm-project?rev=296136&view=rev
Log:
[libcxxabi] Disable calls to fprintf for baremetal targets.
We've been having issues with using libcxxabi and libunwind for baremetal
targets because fprintf is dependent on io functions, this patch disables calls
to fprintf when building for baremetal in release mode.
Differential Revision: https://reviews.llvm.org/D30339
Modified:
libcxxabi/trunk/src/abort_message.cpp
Modified: libcxxabi/trunk/src/abort_message.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/abort_message.cpp?rev=296136&r1=296135&r2=296136&view=diff
==============================================================================
--- libcxxabi/trunk/src/abort_message.cpp (original)
+++ libcxxabi/trunk/src/abort_message.cpp Fri Feb 24 10:43:36 2017
@@ -35,6 +35,7 @@ __attribute__((visibility("hidden"), nor
void abort_message(const char* format, ...)
{
// write message to stderr
+#if !defined(NDEBUG) && !defined(LIBCXXABI_BAREMETAL)
#ifdef __APPLE__
fprintf(stderr, "libc++abi.dylib: ");
#endif
@@ -43,6 +44,7 @@ void abort_message(const char* format, .
vfprintf(stderr, format, list);
va_end(list);
fprintf(stderr, "\n");
+#endif
#if defined(__APPLE__) && defined(HAVE_CRASHREPORTERCLIENT_H)
// record message in crash report
More information about the cfe-commits
mailing list