Use LC_ALL=C in CCompiler.get_library_dirs

Use LC_ALL=C in CCompiler.get_library_dirs to fix wrong results with non
English locales.
pull/2573/merge
Ismael González 7 years ago committed by Jussi Pakkanen
parent 1a50fe45e8
commit d946b03496
  1. 4
      mesonbuild/compilers/c.py

@ -156,7 +156,9 @@ class CCompiler(Compiler):
return ['-shared']
def get_library_dirs(self):
stdo = Popen_safe(self.exelist + ['--print-search-dirs'])[1]
env = os.environ.copy()
env['LC_ALL'] = 'C'
stdo = Popen_safe(self.exelist + ['--print-search-dirs'], env=env)[1]
for line in stdo.split('\n'):
if line.startswith('libraries:'):
libstr = line.split('=', 1)[1]

Loading…
Cancel
Save