[PATCH] D29335: [lld] [test] Use LLD-specific binary&library dirs when building stand-alone
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 12:19:49 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294507: [test] Use LLD-specific binary&library dirs when building stand-alone (authored by mgorny).
Changed prior to commit:
https://reviews.llvm.org/D29335?vs=86450&id=87689#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29335
Files:
lld/trunk/test/lit.cfg
lld/trunk/test/lit.site.cfg.in
Index: lld/trunk/test/lit.site.cfg.in
===================================================================
--- lld/trunk/test/lit.site.cfg.in
+++ lld/trunk/test/lit.site.cfg.in
@@ -6,6 +6,8 @@
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lld_obj_root = "@LLD_BINARY_DIR@"
+config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
+config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@"
config.target_triple = "@TARGET_TRIPLE@"
config.python_executable = "@PYTHON_EXECUTABLE@"
config.have_zlib = "@HAVE_LIBZ@"
Index: lld/trunk/test/lit.cfg
===================================================================
--- lld/trunk/test/lit.cfg
+++ lld/trunk/test/lit.cfg
@@ -66,18 +66,24 @@
# 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 @@
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))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29335.87689.patch
Type: text/x-patch
Size: 2559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170208/b8b5f0e7/attachment.bin>
More information about the llvm-commits
mailing list