Fix an issue with llvm lit tool substitutions.
authorZachary Turner <zturner@google.com>
Fri, 17 Nov 2017 22:51:43 +0000 (22:51 +0000)
committerZachary Turner <zturner@google.com>
Fri, 17 Nov 2017 22:51:43 +0000 (22:51 +0000)
When using an installed clang with an in-tree llvm, we were not
searching in the right paths for the tools.

llvm-svn: 318564

llvm/utils/lit/lit/llvm/config.py

index 798f08a..565220c 100644 (file)
@@ -316,7 +316,7 @@ class LLVMConfig(object):
                 return tool
 
         # Otherwise look in the path.
-        tool = lit.util.which(name, self.config.llvm_tools_dir)
+        tool = lit.util.which(name, self.config.environment['PATH'])
 
         if required and not tool:
             message = "couldn't find '{}' program".format(name)