aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYmrDtnJu <YmrDtnJu@users.noreply.github.com>2017-08-09 23:12:23 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-08-10 10:43:39 +0300
commit0929812eb543fcc834851d69e11732308ec4048d (patch)
treeda05fb5177a156dd99205338f7e51d99aac88bc2
parentbc30ad6dbada192ae4ab0665c0c43781c7957ec7 (diff)
downloadmeson-0929812eb543fcc834851d69e11732308ec4048d.zip
meson-0929812eb543fcc834851d69e11732308ec4048d.tar.gz
meson-0929812eb543fcc834851d69e11732308ec4048d.tar.bz2
Do not ignore stderr on gcc type check in get_gnu_compiler_defines.
As stderr may contain information the user can use to solve the problem with the gcc installation, it should not be ignore but added to the error message.
-rw-r--r--mesonbuild/environment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index a63c89f..d4af9be 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -411,9 +411,9 @@ class Environment:
# Arguments to output compiler pre-processor defines to stdout
# gcc, g++, and gfortran all support these arguments
args = compiler + ['-E', '-dM', '-']
- p, output = Popen_safe(args, write='', stdin=subprocess.PIPE)[0:2]
+ p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE)
if p.returncode != 0:
- raise EnvironmentException('Unable to detect GNU compiler type:\n' + output)
+ raise EnvironmentException('Unable to detect GNU compiler type:\n' + output + error)
# Parse several lines of the type:
# `#define ___SOME_DEF some_value`
# and extract `___SOME_DEF`