rs created this revision.
We've been having issues with using libcxxabi and libunwind for baremetal
targets because fprintf is dependent on io functions, this patch disable calls
to fprintf when building for baremetal targets in release mode.
https://reviews.llvm.org/D30339
Files:
src/abort_message.cpp
Index: src/abort_message.cpp
===================================================================
--- src/abort_message.cpp
+++ src/abort_message.cpp
@@ -35,14 +35,16 @@
void abort_message(const char* format, ...)
{
// write message to stderr
+#if !defined(NDEBUG) && !defined(LIBCXXABI_BAREMETAL)
#ifdef __APPLE__
fprintf(stderr, "libc++abi.dylib: ");
#endif
va_list list;
va_start(list, format);
vfprintf(stderr, format, list);
va_end(list);
fprintf(stderr, "\n");
+#endif
#if defined(__APPLE__) && defined(HAVE_CRASHREPORTERCLIENT_H)
// record message in crash report
Index: src/abort_message.cpp
===================================================================
--- src/abort_message.cpp
+++ src/abort_message.cpp
@@ -35,14 +35,16 @@
void abort_message(const char* format, ...)
{
// write message to stderr
+#if !defined(NDEBUG) && !defined(LIBCXXABI_BAREMETAL)
#ifdef __APPLE__
fprintf(stderr, "libc++abi.dylib: ");
#endif
va_list list;
va_start(list, format);
vfprintf(stderr, format, list);
va_end(list);
fprintf(stderr, "\n");
+#endif
#if defined(__APPLE__) && defined(HAVE_CRASHREPORTERCLIENT_H)
// record message in crash report
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits