EricWF created this revision. Herald added a reviewer: modocache. Currently, LIT configures the LLVM binary path before the Clang binary path. However this breaks testing out-of-tree Clang builds (where the LLVM binary path includes a copy of Clang).
This patch reverses the order of the paths when looking for Clang, putting the Clang binary directory first. https://reviews.llvm.org/D40217 Files: utils/lit/lit/llvm/config.py Index: utils/lit/lit/llvm/config.py =================================================================== --- utils/lit/lit/llvm/config.py +++ utils/lit/lit/llvm/config.py @@ -369,8 +369,9 @@ # Tweak the PATH to include the tools dir and the scripts dir. paths = [self.config.llvm_tools_dir] tools = getattr(self.config, 'clang_tools_dir', None) + # Put Clang first to avoid LLVM from overriding out-of-tree clang builds. if tools: - paths = paths + [tools] + paths = [tools] + paths self.with_environment('PATH', paths, append_path=True) paths = [self.config.llvm_shlib_dir, self.config.llvm_libs_dir]
Index: utils/lit/lit/llvm/config.py =================================================================== --- utils/lit/lit/llvm/config.py +++ utils/lit/lit/llvm/config.py @@ -369,8 +369,9 @@ # Tweak the PATH to include the tools dir and the scripts dir. paths = [self.config.llvm_tools_dir] tools = getattr(self.config, 'clang_tools_dir', None) + # Put Clang first to avoid LLVM from overriding out-of-tree clang builds. if tools: - paths = paths + [tools] + paths = [tools] + paths self.with_environment('PATH', paths, append_path=True) paths = [self.config.llvm_shlib_dir, self.config.llvm_libs_dir]
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits