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]