llvm.org GIT mirror llvm / 302b169
lit/LitConfig.py: Add the new method getToolsPath(dir,paths,tools). It seeks tools(eg. [cmp, grep, sed]) in same directory, to be sane. It seeks "bash" only in the directory found at last time. Or bash would be insane (against other tools). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125175 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 8 years ago
1 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8484
8585 return self.bashPath
8686
87 def getToolsPath(self, dir, paths, tools):
88 import os, Util
89 if dir is not None and os.path.isabs(dir) and os.path.isdir(dir):
90 if not Util.checkToolsPath(dir, tools):
91 return None
92 else:
93 dir = Util.whichTools(tools, paths)
94
95 # bash
96 self.bashPath = Util.which('bash', dir)
97 if self.bashPath is None:
98 self.warning("Unable to find 'bash.exe'.")
99 self.bashPath = ''
100
101 return dir
102
87103 def _write_message(self, kind, message):
88104 import inspect, os, sys
89105