Add the directory specified by LLVM_LIB_SEARCH_PATH to the list of
authorReid Spencer <rspencer@reidspencer.com>
Tue, 24 Aug 2004 22:53:13 +0000 (22:53 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 24 Aug 2004 22:53:13 +0000 (22:53 +0000)
directories to be searched during linking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16041 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc/llvmc.cpp

index 49e3fd90fdec0b02cca91be76ce7f5e80df6e1e1..8c5102a0c4a23ca8ef737cc8826480a359f1d0e8 100644 (file)
@@ -228,6 +228,12 @@ int main(int argc, char **argv) {
     // Construct the CompilerDriver object
     CompilerDriver CD(Provider);
 
+    // If the LLVM_LIB_SEARCH_PATH environment variable is
+    // set, append it to the list of places to search for libraries
+    std::string srchPath = getenv("LLVM_LIB_SEARCH_PATH");
+    if (!srchPath.empty())
+      LibPaths.push_back(srchPath);
+
     // Configure the driver based on options
     CD.setVerbose(Verbose);
     CD.setDebug(Debug);