r359820 - Another attempt to fix "could not find clang-check" lit warning in analyzer-less builds
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Thu May 2 12:47:05 PDT 2019
Author: nico
Date: Thu May 2 12:47:05 2019
New Revision: 359820
URL: http://llvm.org/viewvc/llvm-project?rev=359820&view=rev
Log:
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
Modified:
cfe/trunk/test/lit.cfg.py
Modified: cfe/trunk/test/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg.py?rev=359820&r1=359819&r2=359820&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg.py (original)
+++ cfe/trunk/test/lit.cfg.py Thu May 2 12:47:05 2019
@@ -61,8 +61,7 @@ config.substitutions.append(('%PATH%', c
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_ex
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')
More information about the cfe-commits
mailing list