Exemple #1
0
 def find_llvm_tool(self, tool):
     for suffix in self.llvm_suffixes:
         found = which(tool + suffix)
         if found is not None:
             # If we found the tool with the suffix, lock suffixes to it.
             self.llvm_suffix = [suffix]
             return found
     return None
Exemple #2
0
 def find_tool(self, *names):
     for name in names:
         if name.startswith('llvm-'):
             found = self.find_llvm_tool(name)
         else:
             found = which(name)
         if found is not None:
             return found
     return None
Exemple #3
0
 def find_tool(self, *names):
     for name in names:
         found = which(name)
         if found is not None:
             return found
     return None
Exemple #4
0
 def find_clang(self, tools, suffixes):
     for suffix in suffixes:
         ret = [which(t + suffix) for t in tools]
         if all(t is not None for t in ret):
             return (ret, suffix)
     return None