Without this option, the -run-llc mode does not work with shared objects at
all, making it pointless for use with the code generator debugger.  With it,
it works like a charm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9245 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp
index 654ce95..cd385d6 100644
--- a/lib/Support/ToolRunner.cpp
+++ b/lib/Support/ToolRunner.cpp
@@ -289,6 +289,7 @@
   GCCArgs.push_back(OutputBinary.c_str()); // Output to the right file...
   GCCArgs.push_back("-lm");                // Hard-code the math library...
   GCCArgs.push_back("-O2");                // Optimize the program a bit...
+  GCCArgs.push_back("-Wl,-R.");            // Search this dir for .so files
   GCCArgs.push_back(0);                    // NULL terminator
 
   std::cout << "<gcc>" << std::flush;