From ad5997e87afbfcf1e4d61a492d034480d2f24ab0 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Thu, 12 Oct 2017 21:56:05 +0000 Subject: [lit] Raise the logic for enabling clang & lld substitutions to llvm. This paves the way for other projects which might /use/ clang or lld but not necessarily need to the full set of functionality available to clang and lld tests to be able to have a basic set of substitutions that allow a project to run the clang or lld executables. llvm-svn: 315627 --- lld/test/lit.cfg.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'lld/test/lit.cfg.py') diff --git a/lld/test/lit.cfg.py b/lld/test/lit.cfg.py index a7a0f3af5d6..2a4404461c4 100644 --- a/lld/test/lit.cfg.py +++ b/lld/test/lit.cfg.py @@ -10,7 +10,6 @@ import lit.formats import lit.util from lit.llvm import llvm_config -from lit.llvm.subst import ToolSubst # Configuration file for the 'lit' test runner. @@ -36,28 +35,14 @@ config.test_source_root = os.path.dirname(__file__) config.test_exec_root = os.path.join(config.lld_obj_root, 'test') -# Tweak the PATH to include the tools dir and the scripts dir. -llvm_config.with_environment('PATH', - [config.llvm_tools_dir, config.lld_tools_dir], append_path=True) - -llvm_config.with_environment('LD_LIBRARY_PATH', - [config.lld_libs_dir, config.llvm_libs_dir], append_path=True) - llvm_config.use_default_substitutions() - -# For each occurrence of a clang tool name, replace it with the full path to -# the build directory holding that tool. We explicitly specify the directories -# to search to ensure that we get the tools just built and not some random -# tools that might happen to be in the user's PATH. -tool_dirs = [config.lld_tools_dir, config.llvm_tools_dir] +llvm_config.use_lld() tool_patterns = [ - ToolSubst('ld.lld', extra_args=['--full-shutdown']), - 'lld-link', 'llvm-as', 'llvm-mc', 'llvm-nm', - 'llvm-objdump', 'llvm-pdbutil', 'llvm-readobj', 'obj2yaml', 'yaml2obj', - 'lld'] + 'llvm-as', 'llvm-mc', 'llvm-nm', + 'llvm-objdump', 'llvm-pdbutil', 'llvm-readobj', 'obj2yaml', 'yaml2obj'] -llvm_config.add_tool_substitutions(tool_patterns, tool_dirs) +llvm_config.add_tool_substitutions(tool_patterns) # When running under valgrind, we mangle '-vg' onto the end of the triple so we # can check it with XFAIL and XTARGET. -- cgit v1.2.3