Skip to content

Commit

Permalink
[libcxxabi] Disable calls to fprintf for baremetal targets.
Browse files Browse the repository at this point in the history
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

llvm-svn: 296136
  • Loading branch information
rs-arm committed Feb 24, 2017
1 parent 744dabc commit 4987856
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libcxxabi/src/abort_message.cpp
Expand Up @@ -35,6 +35,7 @@ __attribute__((visibility("hidden"), noreturn))
void abort_message(const char* format, ...)
{
// write message to stderr
#if !defined(NDEBUG) && !defined(LIBCXXABI_BAREMETAL)
#ifdef __APPLE__
fprintf(stderr, "libc++abi.dylib: ");
#endif
Expand All @@ -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
Expand Down

0 comments on commit 4987856

Please sign in to comment.