Moved enum and command-line option in separate file. Also added function that returns...
[oota-llvm.git] / lib / Support / PluginLoader.cpp
index b973b16a508cecf7aa5d334b92d6156146774620..76c5e8197df4bbd00294760026fb18aa1138ca30 100644 (file)
@@ -18,7 +18,7 @@
 namespace {
   struct PluginLoader {
     void operator=(const std::string &Filename) {
-      if (dlopen(Filename.c_str(), RTLD_NOW) == 0)
+      if (dlopen(Filename.c_str(), RTLD_NOW|RTLD_GLOBAL) == 0)
         std::cerr << "Error opening '" << Filename << "': " << dlerror()
                   << "\n  -load request ignored.\n";
     }