[PATCH] D39278: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 19:31:59 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316635: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows. (authored by ikudrin).
Changed prior to commit:
https://reviews.llvm.org/D39278?vs=120191&id=120352#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39278
Files:
lld/trunk/test/lit.cfg.py
Index: lld/trunk/test/lit.cfg.py
===================================================================
--- lld/trunk/test/lit.cfg.py
+++ lld/trunk/test/lit.cfg.py
@@ -83,8 +83,10 @@
if (config.llvm_libxml2_enabled == '1'):
config.available_features.add('libxml2')
-tar_version = subprocess.Popen(
- ['tar', '--version'], stdout=subprocess.PIPE, env={'LANG': 'C'})
-if 'GNU tar' in tar_version.stdout.read().decode():
- config.available_features.add('gnutar')
-tar_version.wait()
+tar_executable = lit.util.which('tar', config.environment['PATH'])
+if tar_executable:
+ tar_version = subprocess.Popen(
+ [tar_executable, '--version'], stdout=subprocess.PIPE, env={'LANG': 'C'})
+ if 'GNU tar' in tar_version.stdout.read().decode():
+ config.available_features.add('gnutar')
+ tar_version.wait()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39278.120352.patch
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/12484c33/attachment.bin>
More information about the llvm-commits
mailing list