[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

llvm-svn: 296136
This commit is contained in:
Ranjeet Singh 2017-02-24 16:43:36 +00:00
parent 744dabcdcd
commit 4987856fbc

View File

@ -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
@ -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