[lldb] Use config.lldb_src_root in lit_config.load_config (NFC)

Rather than relaying on CMake to substitute the full path to the lldb
source root, use the  value set in config.lldb_src_root. This makes it
slightly easier to write a custom lit.site.cfg.py.
This commit is contained in:
Jonas Devlieghere 2020-09-29 23:00:18 -07:00
parent 4e4f926e83
commit 154860af33
3 changed files with 4 additions and 3 deletions

View File

@ -69,4 +69,4 @@ except KeyError as e:
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
# Let the main config do the real work.
lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/API/lit.cfg.py")
lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "API", "lit.cfg.py"))

View File

@ -6,6 +6,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.llvm_shlib_dir = "@SHLIBDIR@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
config.lldb_obj_root = "@LLDB_BINARY_DIR@"
config.lldb_libs_dir = "@LLDB_LIBS_DIR@"
config.lldb_tools_dir = "@LLDB_TOOLS_DIR@"
@ -42,4 +43,4 @@ import lit.llvm
lit.llvm.initialize(lit_config, config)
# Let the main config do the real work.
lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/Shell/lit.cfg.py")
lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "Shell", "lit.cfg.py"))

View File

@ -26,4 +26,4 @@ import lit.llvm
lit.llvm.initialize(lit_config, config)
# Let the main config do the real work.
lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/Unit/lit.cfg.py")
lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "Unit", "lit.cfg.py"))