[PATCH] D40217: [LIT] Fix testing out-of-tree Clang builds

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 14:34:14 PST 2017


+mgorny

On Sat, Nov 18, 2017 at 2:24 PM Eric Fiselier via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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]
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171118/bc3ce3cf/attachment.html>


More information about the llvm-commits mailing list