[lld] r244107 - lit fixes for lld.

Rafael Espindola rafael.espindola at gmail.com
Wed Aug 5 12:55:17 PDT 2015


Author: rafael
Date: Wed Aug  5 14:55:17 2015
New Revision: 244107

URL: http://llvm.org/viewvc/llvm-project?rev=244107&view=rev
Log:
lit fixes for lld.

It was not using LLVM_LIT_TOOLS_DIR and at least on my VM never finding lib.exe.

With this all the COFF tests show up as supported and pass.

Modified:
    lld/trunk/test/lit.cfg

Modified: lld/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=244107&r1=244106&r2=244107&view=diff
==============================================================================
--- lld/trunk/test/lit.cfg (original)
+++ lld/trunk/test/lit.cfg Wed Aug  5 14:55:17 2015
@@ -14,6 +14,18 @@ import lit.util
 # name: The name of this test suite.
 config.name = 'lld'
 
+# Tweak PATH for Win32
+if sys.platform in ['win32']:
+    # Seek sane tools in directories and set to $PATH.
+    path = getattr(config, 'lit_tools_dir', None)
+    path = lit_config.getToolsPath(path,
+                                   config.environment['PATH'],
+                                   ['cmp.exe', 'grep.exe', 'sed.exe'])
+    if path is not None:
+        path = os.path.pathsep.join((path,
+                                     config.environment['PATH']))
+        config.environment['PATH'] = path
+
 # Choose between lit's internal shell pipeline runner and a real shell.  If
 # LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
 use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
@@ -178,5 +190,5 @@ if cvtres and rc:
     config.available_features.add('winres')
 
 # Check if "lib.exe" command exists.
-if lit.util.which('lib.exe', config.environment['PATH']):
+if lit.util.which('lib', config.environment['PATH']):
     config.available_features.add('winlib')




More information about the llvm-commits mailing list