summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/int_util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/lib/int_util.c b/compiler-rt/lib/int_util.c
index f19476864b1..871d191658c 100644
--- a/compiler-rt/lib/int_util.c
+++ b/compiler-rt/lib/int_util.c
@@ -29,6 +29,19 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) {
panic("%s:%d: abort in %s", file, line, function);
}
+#elif __APPLE__ && !__STATIC__
+
+/* from libSystem.dylib */
+extern void __assert_rtn(const char *func, const char *file,
+ int line, const char * message) __attribute__((noreturn));
+
+__attribute__((weak))
+__attribute__((visibility("hidden")))
+void compilerrt_abort_impl(const char *file, int line, const char *function) {
+ __assert_rtn(function, file, line, "libcompiler_rt abort");
+}
+
+
#else
/* Get the system definition of abort() */
OpenPOWER on IntegriCloud