summaryrefslogtreecommitdiff
path: root/test/lit.cfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg.py')
-rw-r--r--test/lit.cfg.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
index e956bb74f5a..06a23536a8c 100644
--- a/test/lit.cfg.py
+++ b/test/lit.cfg.py
@@ -123,6 +123,7 @@ if config.have_ocamlopt:
ocamlopt_command = '%s ocamlopt -cclib -L%s -cclib -Wl,-rpath,%s %s' % (
config.ocamlfind_executable, config.llvm_lib_dir, config.llvm_lib_dir, config.ocaml_flags)
+opt_viewer_cmd = '%s %s/tools/opt-viewer/opt-viewer.py' % (sys.executable, config.llvm_src_root)
tools = [
ToolSubst('%lli', FindTool('lli'), post='.', extra_args=lli_args),
@@ -132,6 +133,7 @@ tools = [
ToolSubst('%ld64', ld64_cmd, unresolved='ignore'),
ToolSubst('%ocamlc', ocamlc_command, unresolved='ignore'),
ToolSubst('%ocamlopt', ocamlopt_command, unresolved='ignore'),
+ ToolSubst('%opt-viewer', opt_viewer_cmd),
]
# FIXME: Why do we have both `lli` and `%lli` that do slightly different things?
@@ -286,3 +288,6 @@ if config.have_libxar:
if config.llvm_libxml2_enabled == '1':
config.available_features.add('libxml2')
+
+if config.have_opt_viewer_modules:
+ config.available_features.add('have_opt_viewer_modules')