diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-11-19 00:00:49 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-11-19 00:00:49 +0000 |
| commit | c812560c1498a6f20c9fb6dde0c95a30425f8a0f (patch) | |
| tree | 44abffd978655f343764f69db785a2208a3be6c2 | |
| parent | 72f40041f6cf5a92944bfc0705fb9e96401b878c (diff) | |
| download | bcm5719-llvm-c812560c1498a6f20c9fb6dde0c95a30425f8a0f.tar.gz bcm5719-llvm-c812560c1498a6f20c9fb6dde0c95a30425f8a0f.zip | |
[LIT] Fix testing out-of-tree Clang builds
Summary:
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.
Reviewers: zturner, beanz, chapuni, modocache, EricWF
Reviewed By: EricWF
Subscribers: mgorny, cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D40217
llvm-svn: 318607
| -rw-r--r-- | llvm/utils/lit/lit/llvm/config.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py index 565220c06f0..c631f8b8865 100644 --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -367,10 +367,10 @@ class LLVMConfig(object): self.clear_environment(possibly_dangerous_env_vars) # 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) - if tools: - paths = paths + [tools] + # Put Clang first to avoid LLVM from overriding out-of-tree clang builds. + possible_paths = ['clang_tools_dir', 'llvm_tools_dir'] + paths = [getattr(self.config, pp) for pp in possible_paths + if getattr(self.config, pp, None)] self.with_environment('PATH', paths, append_path=True) paths = [self.config.llvm_shlib_dir, self.config.llvm_libs_dir] |

