aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-09-17 04:25:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-09-17 04:25:24 +0000
commit7ca6e73e7f192dc16ec9e47d6d1b0079736e37a0 (patch)
tree913c55092d9f7635851bc3ccdcef2237628b3140
parentc6a8c0580b5877edf5159fc2c8d5488df74e5b95 (diff)
System: Don't reexport ___eprintf when building with Clang; this symbol isn't
used on Darwin anymore, and Clang might not always link with the library it is currently found in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114165 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/System/SearchForAddressOfSpecialSymbol.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/System/SearchForAddressOfSpecialSymbol.cpp b/lib/System/SearchForAddressOfSpecialSymbol.cpp
index 73b484c2e9..2fcc3401c3 100644
--- a/lib/System/SearchForAddressOfSpecialSymbol.cpp
+++ b/lib/System/SearchForAddressOfSpecialSymbol.cpp
@@ -32,7 +32,14 @@ static void *DoSearch(const char* symbolName) {
EXPLICIT_SYMBOL(__ashrdi3);
EXPLICIT_SYMBOL(__cmpdi2);
EXPLICIT_SYMBOL(__divdi3);
+
+ // Clang doesn't always link against libgcc.a, which is the only thing which
+ // defines ___eprintf in the modern world. Just don't attempt to export this
+ // symbol when building with Clang.
+#ifndef __clang__
EXPLICIT_SYMBOL(__eprintf);
+#endif
+
EXPLICIT_SYMBOL(__fixdfdi);
EXPLICIT_SYMBOL(__fixsfdi);
EXPLICIT_SYMBOL(__fixunsdfdi);