From d946b03496a41ebd878a6c40fa3fca1c74a1e654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismael=20Gonz=C3=A1lez?= Date: Mon, 11 Dec 2017 13:07:43 +0100 Subject: 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. --- mesonbuild/compilers/c.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 9c1d1fc..8753c56 100644 --- a/mesonbuild/compilers/c.py +++ b/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] -- cgit v1.1