diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-17 09:59:29 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2020-09-24 12:14:13 -0700 |
| commit | d326c87fe22507b8c25078a7cd7ed88499ba7dc1 (patch) | |
| tree | b58f159c6a1eee67c906bf38026649c64ce09b8f /mesonbuild/compilers/mixins/gnu.py | |
| parent | 8fa0548e080dd006821ff985868fdef789935feb (diff) | |
| download | meson-d326c87fe22507b8c25078a7cd7ed88499ba7dc1.tar.gz | |
compilers: Use a distinct type for compile/link results
Currently we do some crazy hackery where we add extra properties to a
Popen object and return that. That's crazy. Especially since some of our
hackery is to delete attributes off of the Popen we don't want. Instead,
let's just have a discrete type that has exactly the properties we want.
Diffstat (limited to 'mesonbuild/compilers/mixins/gnu.py')
| -rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index 83f70474d..538cc0304 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -227,8 +227,7 @@ class GnuLikeCompiler(metaclass=abc.ABCMeta): with self._build_wrapper('', env, extra_args=extra_args, dependencies=None, mode='compile', want_output=True) as p: - stdo = p.stdo - return stdo + return p.stdout def _split_fetch_real_dirs(self, pathstr: str) -> T.List[str]: # We need to use the path separator used by the compiler for printing @@ -364,9 +363,9 @@ class GnuCompiler(GnuLikeCompiler): # another language, but still complete with exit_success with self._build_wrapper(code, env, args, None, mode) as p: result = p.returncode == 0 - if self.language in {'cpp', 'objcpp'} and 'is valid for C/ObjC' in p.stde: + if self.language in {'cpp', 'objcpp'} and 'is valid for C/ObjC' in p.stderr: result = False - if self.language in {'c', 'objc'} and 'is valid for C++/ObjC++' in p.stde: + if self.language in {'c', 'objc'} and 'is valid for C++/ObjC++' in p.stderr: result = False return result, p.cached |
