diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-05-02 19:47:05 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-05-02 19:47:05 +0000 |
commit | 88767d874da80da9730a6610302dee8a559a4a7e (patch) | |
tree | 76b2525485fdf3e72d4bdd1372234225cd9bb299 | |
parent | 151e674ab9981c986990e45c8a0a97815cac2021 (diff) |
Another attempt to fix "could not find clang-check" lit warning in analyzer-less builds
r359717 added clang-check as a dep of check-clang unconditionally
because I had missed lit.local.cfg in test/Tooling.
Instead, only add clang-check to the tools if the analyzer is enabled,
since the build target only exists then, and since all tests using
clang-check are skipped when the analyzer is disabled.
Differential Revision: https://reviews.llvm.org/D61418
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359820 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/lit.cfg.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/lit.cfg.py b/test/lit.cfg.py index ace0b81081..50c00f6a96 100644 --- a/test/lit.cfg.py +++ b/test/lit.cfg.py @@ -61,8 +61,7 @@ config.substitutions.append(('%PATH%', config.environment['PATH'])) tool_dirs = [config.clang_tools_dir, config.llvm_tools_dir] tools = [ - 'c-index-test', 'clang-check', 'clang-diff', 'clang-format', 'clang-tblgen', - 'opt', + 'c-index-test', 'clang-diff', 'clang-format', 'clang-tblgen', 'opt', ToolSubst('%clang_extdef_map', command=FindTool( 'clang-extdef-mapping'), unresolved='ignore'), ] @@ -71,6 +70,14 @@ if config.clang_examples: config.available_features.add('examples') tools.append('clang-interpreter') +if config.clang_staticanalyzer: + config.available_features.add('staticanalyzer') + tools.append('clang-check') + + if config.clang_staticanalyzer_z3 == '1': + config.available_features.add('z3') + + llvm_config.add_tool_substitutions(tools, tool_dirs) config.substitutions.append( @@ -92,13 +99,6 @@ if has_plugins and config.llvm_plugin_ext: if config.clang_default_cxx_stdlib != '': config.available_features.add('default-cxx-stdlib-set') -# Enabled/disabled features -if config.clang_staticanalyzer: - config.available_features.add('staticanalyzer') - - if config.clang_staticanalyzer_z3 == '1': - config.available_features.add('z3') - # As of 2011.08, crash-recovery tests still do not pass on FreeBSD. if platform.system() not in ['FreeBSD']: config.available_features.add('crash-recovery') |