Author: Martin Storsjö Date: 2021-04-23T09:23:17+03:00 New Revision: 072c90a863aac1334a4950b3da262a025516dea0
URL: https://github.com/llvm/llvm-project/commit/072c90a863aac1334a4950b3da262a025516dea0 DIFF: https://github.com/llvm/llvm-project/commit/072c90a863aac1334a4950b3da262a025516dea0.diff LOG: [LLD] Fix probing a MSYS based 'tar' in a Windows Container Don't run the 'tar' tool in a cleared environment with only the LANG variable set, just set LANG on top of the existing environment. If the 'tar' tool is an MSYS based tool, running it in a Windows Container hangs if all environment variables are cleared - in particular, the USERPROFILE variable needs to be kept intact. This is the same issue fixed as was fixed in other places in 9de63b2e051cb3e79645cc20b83b4d33d132cba0, but contrary to running the actual tests, running with an as-cleared-as-possible environment here is less important. Differential Revision: https://reviews.llvm.org/D99304 (cherry picked from commit a88556733a4dced22416bd3f45255128b9eb4f49) Added: Modified: lld/test/lit.cfg.py Removed: ################################################################################ diff --git a/lld/test/lit.cfg.py b/lld/test/lit.cfg.py index 8e31fd3977f9a..670f41f0b6313 100644 --- a/lld/test/lit.cfg.py +++ b/lld/test/lit.cfg.py @@ -101,11 +101,13 @@ tar_executable = lit.util.which('tar', config.environment['PATH']) if tar_executable: + env = os.environ + env['LANG'] = 'C' tar_version = subprocess.Popen( [tar_executable, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, - env={'LANG': 'C'}) + env=env) sout, _ = tar_version.communicate() if 'GNU tar' in sout.decode(): config.available_features.add('gnutar') _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits