X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FDynamicLibrary.cpp;h=d2b551e8a0a61bc85c8186d2d2e1e90af3a49752;hb=52fa0d066a8fb81716713b85841b1aa031dbf8fc;hp=40072636608de494c44273b823b196f9b5e0c3cc;hpb=70d2d3cd4519893bff442b14d09883e03565f2a1;p=oota-llvm.git diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp index 40072636608..d2b551e8a0a 100644 --- a/lib/Support/DynamicLibrary.cpp +++ b/lib/Support/DynamicLibrary.cpp @@ -56,15 +56,8 @@ static DenseSet *OpenedHandles = nullptr; DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename, std::string *errMsg) { SmartScopedLock lock(*SymbolsMutex); - int flags = RTLD_LAZY | RTLD_GLOBAL; -#if defined(__APPLE__) - // RTLD_FIRST is an apple specific flag which causes dlsym() to search only - // the module specified in |filename|, and not dependent modules. This - // behavior would be desirable for other platforms as well, except that - // there's not a good way to implement it. - flags |= RTLD_FIRST; -#endif - void *handle = dlopen(filename, flags); + + void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); if (!handle) { if (errMsg) *errMsg = dlerror(); return DynamicLibrary();