summaryrefslogtreecommitdiffstats
path: root/lld/test/lit.cfg.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-10-12 21:56:05 +0000
committerZachary Turner <zturner@google.com>2017-10-12 21:56:05 +0000
commitad5997e87afbfcf1e4d61a492d034480d2f24ab0 (patch)
treee5e14e0fc03c5afdb4b628b420012fbd739bb04d /lld/test/lit.cfg.py
parent14cf51410ba352883a52aea8c6e19721be7615cc (diff)
downloadbcm5719-llvm-ad5997e87afbfcf1e4d61a492d034480d2f24ab0.tar.gz
bcm5719-llvm-ad5997e87afbfcf1e4d61a492d034480d2f24ab0.zip
[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
Diffstat (limited to 'lld/test/lit.cfg.py')
-rw-r--r--lld/test/lit.cfg.py23
1 files changed, 4 insertions, 19 deletions
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.
OpenPOWER on IntegriCloud