Index: lldb/lit/CMakeLists.txt =================================================================== --- lldb/lit/CMakeLists.txt +++ lldb/lit/CMakeLists.txt @@ -81,6 +81,10 @@ ${CMAKE_CURRENT_SOURCE_DIR}/Suite/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/Suite/lit.site.cfg) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/lit-lldb-init.in + ${CMAKE_CURRENT_BINARY_DIR}/lit-lldb-init) + if(NOT LLDB_BUILT_STANDALONE) list(APPEND LLDB_TEST_DEPS FileCheck Index: lldb/lit/helper/toolchain.py =================================================================== --- lldb/lit/helper/toolchain.py +++ lldb/lit/helper/toolchain.py @@ -34,32 +34,35 @@ if config.llvm_libs_dir: build_script_args.append('--libs-dir={0}'.format(config.llvm_libs_dir)) + lldb_init = os.path.join(config.test_exec_root, 'lit-lldb-init') + primary_tools = [ - ToolSubst('%lldb', - command=FindTool('lldb'), - extra_args=['--no-lldbinit', '-S', - os.path.join(config.test_source_root, - 'lit-lldb-init')]), - ToolSubst('%lldb-init', - command=FindTool('lldb'), - extra_args=['-S', - os.path.join(config.test_source_root, - 'lit-lldb-init')]), + ToolSubst( + '%lldb', + command=FindTool('lldb'), + extra_args=['--no-lldbinit', '-S', lldb_init]), + ToolSubst( + '%lldb-init', + command=FindTool('lldb'), + extra_args=['-S', lldb_init]), lldbmi, - ToolSubst('%debugserver', - command=FindTool(dsname), - extra_args=dsargs, - unresolved='ignore'), - ToolSubst('%platformserver', - command=FindTool('lldb-server'), - extra_args=['platform'], - unresolved='ignore'), + ToolSubst( + '%debugserver', + command=FindTool(dsname), + extra_args=dsargs, + unresolved='ignore'), + ToolSubst( + '%platformserver', + command=FindTool('lldb-server'), + extra_args=['platform'], + unresolved='ignore'), 'lldb-test', 'lldb-instr', - ToolSubst('%build', - command="'" + sys.executable + "'", - extra_args=build_script_args) - ] + ToolSubst( + '%build', + command="'" + sys.executable + "'", + extra_args=build_script_args) + ] llvm_config.add_tool_substitutions(primary_tools, [config.lldb_tools_dir])