summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 0db879312413..85469ff6fb73 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -66,18 +66,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None)
# Tweak the PATH to include the tools dir and the scripts dir.
if lld_obj_root is not None:
+ lld_tools_dir = getattr(config, 'lld_tools_dir', None)
+ if not lld_tools_dir:
+ lit_config.fatal('No LLD tools dir set!')
llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
if not llvm_tools_dir:
lit_config.fatal('No LLVM tools dir set!')
- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
+ path = os.path.pathsep.join((lld_tools_dir, llvm_tools_dir, config.environment['PATH']))
path = os.path.pathsep.join((os.path.join(getattr(config, 'llvm_src_root', None),'test','Scripts'),path))
config.environment['PATH'] = path
+ lld_libs_dir = getattr(config, 'lld_libs_dir', None)
+ if not lld_libs_dir:
+ lit_config.fatal('No LLD libs dir set!')
llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
if not llvm_libs_dir:
lit_config.fatal('No LLVM libs dir set!')
- path = os.path.pathsep.join((llvm_libs_dir,
+ path = os.path.pathsep.join((lld_libs_dir, llvm_libs_dir,
config.environment.get('LD_LIBRARY_PATH','')))
config.environment['LD_LIBRARY_PATH'] = path
@@ -174,10 +180,10 @@ for pattern in tool_patterns:
pattern)
tool_pipe = tool_match.group(2)
tool_name = tool_match.group(4)
- tool_path = lit.util.which(tool_name, llvm_tools_dir)
+ tool_path = lit.util.which(tool_name, config.environment['PATH'])
if not tool_path:
# Warn, but still provide a substitution.
- lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir)
+ lit_config.note('Did not find ' + tool_name + ' in ' + path)
tool_path = llvm_tools_dir + '/' + tool_name
config.substitutions.append((pattern, tool_pipe + tool_path))
@@ -196,7 +202,7 @@ if execute_external:
config.available_features.add('shell')
# zlib compression library
-if config.have_zlib == "1":
+if config.have_zlib:
config.available_features.add("zlib")
# Running on Darwin OS