[PATCH] D30339: Disable calls to fprintf when building for baremetal targets in release mode
Ranjeet Singh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 24 08:08:40 PST 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30339.89674.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170224/eba26020/attachment.bin>
More information about the cfe-commits
mailing list