diff options
author | Alexis Jeandet <alexis.jeandet@member.fsf.org> | 2017-11-01 14:52:50 +0100 |
---|---|---|
committer | Alexis Jeandet <alexis.jeandet@member.fsf.org> | 2017-11-01 15:08:23 +0100 |
commit | f15a57f31a43441210d89aa5dc0a6e0bac777a60 (patch) | |
tree | f3ced435aa0b9c389cd72c6a66c41b6d30392e6b /mesonbuild/compilers/compilers.py | |
parent | cde0f4fca18b15a86218911d8519e1d334a27c7f (diff) | |
download | meson-f15a57f31a43441210d89aa5dc0a6e0bac777a60.zip meson-f15a57f31a43441210d89aa5dc0a6e0bac777a60.tar.gz meson-f15a57f31a43441210d89aa5dc0a6e0bac777a60.tar.bz2 |
Fix detection of include dirs with gnu compiler and non C locale
Auto detection was based on parsing gcc's output so we have to
ensure that it is always 'C'.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 3f088b0..813719b 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -923,11 +923,14 @@ def get_largefile_args(compiler): def gnulike_default_include_dirs(compiler, lang): if lang == 'cpp': lang = 'c++' + env = os.environ.copy() + env["LC_ALL"] = 'C' p = subprocess.Popen( compiler + ['-x{}'.format(lang), '-E', '-v', '-'], stdin=subprocess.DEVNULL, stderr=subprocess.PIPE, - stdout=subprocess.PIPE + stdout=subprocess.PIPE, + env=env ) stderr = p.stderr.read().decode('utf-8') parse_state = 0 |