File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 9
9
from lit .llvm .subst import FindTool
10
10
from lit .llvm .subst import ToolSubst
11
11
12
+ def _disallow (config , execName ):
13
+ warning = '''
14
+ echo '*** Do not use \' {0}\' in tests; use \' %''{0}\' . ***' &&
15
+ exit 1 && echo
16
+ '''
17
+ config .substitutions .append ((' {0} ' .format (execName ),
18
+ warning .format (execName )))
19
+
20
+
12
21
def use_lldb_substitutions (config ):
13
22
# Set up substitutions for primary tools. These tools must come from config.lldb_tools_dir
14
23
# which is basically the build output directory. We do not want to find these in path or
@@ -53,6 +62,10 @@ def use_lldb_substitutions(config):
53
62
extra_args = build_script_args )
54
63
]
55
64
65
+ _disallow (config , 'lldb' )
66
+ _disallow (config , 'debugserver' )
67
+ _disallow (config , 'platformserver' )
68
+
56
69
llvm_config .add_tool_substitutions (primary_tools ,
57
70
[config .lldb_tools_dir ])
58
71
@@ -135,3 +148,5 @@ def use_support_substitutions(config):
135
148
'llvm-objcopy' , 'lli' ]
136
149
additional_tool_dirs += [config .lldb_tools_dir , config .llvm_tools_dir ]
137
150
llvm_config .add_tool_substitutions (support_tools , additional_tool_dirs )
151
+
152
+ _disallow (config , 'clang' )
You can’t perform that action at this time.
0 commit comments