diff options
author | Ranjeet Singh <Ranjeet.Singh@arm.com> | 2017-02-24 16:43:36 +0000 |
---|---|---|
committer | Ranjeet Singh <Ranjeet.Singh@arm.com> | 2017-02-24 16:43:36 +0000 |
commit | fd7644ada116345fd38888e4a071d6b273d9b590 (patch) | |
tree | 2a033b2ae2fb5af4d794f234015a17b132ef0897 /src | |
parent | f0f0257d7aee1231de02136138151f4566eab837 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src')
-rw-r--r-- | src/abort_message.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/abort_message.cpp b/src/abort_message.cpp index 5e25c0f..bdc18ce 100644 --- a/src/abort_message.cpp +++ b/src/abort_message.cpp @@ -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 |