diff options
Diffstat (limited to 'contrib/llvm/lib/System/DynamicLibrary.cpp')
-rw-r--r-- | contrib/llvm/lib/System/DynamicLibrary.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm/lib/System/DynamicLibrary.cpp b/contrib/llvm/lib/System/DynamicLibrary.cpp index 6f6890c..660db49 100644 --- a/contrib/llvm/lib/System/DynamicLibrary.cpp +++ b/contrib/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); |