]> granicus.if.org Git - llvm/commitdiff
Add support for allowing the user to extend the GCCLD searchpath
authorChris Lattner <sabre@nondot.org>
Mon, 21 Apr 2003 19:53:24 +0000 (19:53 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Apr 2003 19:53:24 +0000 (19:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5825 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccld/gccld.cpp

index 90cebb4df08837dbfcc45941bd9cf56f15e5f4d6..1d61d13a63f195b9f27f6305803d53598330ca9d 100644 (file)
@@ -294,6 +294,10 @@ int main(int argc, char **argv) {
   if (Composite.get() == 0)
     return PrintAndReturn(argv[0], ErrorMessage);
 
+  // If the user specied an extra search path in their environment, respect it.
+  if (char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH"))
+    LibPaths.push_back(SearchPath);
+
   for (unsigned i = 1; i < InputFilenames.size(); ++i) {
     std::auto_ptr<Module> M(LoadObject(InputFilenames[i], ErrorMessage));
     if (M.get() == 0)