Use RTLD_GLOBAL when loading libraries. This is needed to get LLVM working on the Mac in rustc.

This commit is contained in:
Patrick Walton 2010-10-05 11:36:48 -07:00
parent 19d0fa107a
commit 246e72b0fb

View File

@ -8,7 +8,7 @@ rust_crate_cache::lib::lib(rust_dom *dom, char const *name)
#if defined(__WIN32__)
handle = (uintptr_t)LoadLibrary(_T(name));
#else
handle = (uintptr_t)dlopen(name, RTLD_LOCAL|RTLD_LAZY);
handle = (uintptr_t)dlopen(name, RTLD_GLOBAL|RTLD_LAZY);
#endif
dom->log(rust_log::CACHE, "loaded library '%s' as 0x%" PRIxPTR,
name, handle);