diff --git a/lld/test/lit.cfg.py b/lld/test/lit.cfg.py --- 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')