summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-17 15:42:43 +0000
committerChris Lattner <sabre@nondot.org>2010-08-17 15:42:43 +0000
commit2c76ae54e5e4523b907967d9ec3ee6266b006f87 (patch)
treeb75e2e30a55d7b3a326f0b56d96ea065d5c09271 /llvm/lib/System
parentb13847aecae0462a61b836daabf93a693a02846e (diff)
downloadbcm5719-llvm-2c76ae54e5e4523b907967d9ec3ee6266b006f87.tar.gz
bcm5719-llvm-2c76ae54e5e4523b907967d9ec3ee6266b006f87.zip
Fix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp on
cygwin when built with ENABLE_SHARED=1. Patch by NAKAMURA Takumi! llvm-svn: 111231
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/DynamicLibrary.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/System/DynamicLibrary.cpp b/llvm/lib/System/DynamicLibrary.cpp
index 6f6890c06c4..660db492d6b 100644
--- a/llvm/lib/System/DynamicLibrary.cpp
+++ b/llvm/lib/System/DynamicLibrary.cpp
@@ -70,6 +70,12 @@ bool DynamicLibrary::LoadLibraryPermanently(const char *Filename,
if (ErrMsg) *ErrMsg = dlerror();
return true;
}
+#ifdef __CYGWIN__
+ // Cygwin searches symbols only in the main
+ // with the handle of dlopen(NULL, RTLD_GLOBAL).
+ if (Filename == NULL)
+ H = RTLD_DEFAULT;
+#endif
if (OpenedHandles == 0)
OpenedHandles = new std::vector<void *>();
OpenedHandles->push_back(H);
OpenPOWER on IntegriCloud