Skip to content

Commit 892f022

Browse files
committed
[lit] Deduplicate logic in toolchain.py
No need to compute the path of lit-lldb-init twice. llvm-svn: 364113
1 parent 1c6fc7d commit 892f022

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lldb/lit/helper/toolchain.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,15 @@ def use_lldb_substitutions(config):
3434
if config.llvm_libs_dir:
3535
build_script_args.append('--libs-dir={0}'.format(config.llvm_libs_dir))
3636

37+
lldb_init = os.path.join(config.test_exec_root, 'lit-lldb-init')
38+
3739
primary_tools = [
3840
ToolSubst('%lldb',
3941
command=FindTool('lldb'),
40-
extra_args=['--no-lldbinit', '-S',
41-
os.path.join(config.test_exec_root,
42-
'lit-lldb-init')]),
42+
extra_args=['--no-lldbinit', '-S', lldb_init]),
4343
ToolSubst('%lldb-init',
4444
command=FindTool('lldb'),
45-
extra_args=['-S',
46-
os.path.join(config.test_exec_root,
47-
'lit-lldb-init')]),
45+
extra_args=['-S', lldb_init]),
4846
lldbmi,
4947
ToolSubst('%debugserver',
5048
command=FindTool(dsname),

0 commit comments

Comments
 (0)