aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-shlib/libllvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-shlib/libllvm.cpp')
-rw-r--r--tools/llvm-shlib/libllvm.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/llvm-shlib/libllvm.cpp b/tools/llvm-shlib/libllvm.cpp
index 40b4f66..8424d66 100644
--- a/tools/llvm-shlib/libllvm.cpp
+++ b/tools/llvm-shlib/libllvm.cpp
@@ -11,3 +11,10 @@
// you can't define a target with no sources.
//
//===----------------------------------------------------------------------===//
+
+#include "llvm/Config/config.h"
+
+#if defined(DISABLE_LLVM_DYLIB_ATEXIT)
+extern "C" int __cxa_atexit();
+extern "C" int __cxa_atexit() { return 0; }
+#endif