aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-09-05 17:22:31 -0400
committerDylan Baker <dylan@pnwbakers.com>2022-09-09 14:12:14 -0700
commite3a4dc72183650bea56e12ae5a060ee378244494 (patch)
tree6563ce7135b9f2de9299da126ebd07fb2e2369d6 /mesonbuild/compilers
parent167356aeabe576b0c777b329748d314d4931a777 (diff)
downloadmeson-e3a4dc72183650bea56e12ae5a060ee378244494.zip
meson-e3a4dc72183650bea56e12ae5a060ee378244494.tar.gz
meson-e3a4dc72183650bea56e12ae5a060ee378244494.tar.bz2
compilers: fix regression in logging cached compile commands
In commit d326c87fe22507b8c25078a7cd7ed88499ba7dc1 we added a special holder object for cached compilation results, with some broken attributes: - "command", that was never set, but used to print the log - "args", that was set to some, but not all, of the information a fresh compilation would log, but never used Remove the useless args attribute, call it command, and use it properly.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/compilers.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 73e05b4..ef35110 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -453,18 +453,17 @@ class CompileResult(HoldableObject):
"""The result of Compiler.compiles (and friends)."""
def __init__(self, stdo: T.Optional[str] = None, stde: T.Optional[str] = None,
- args: T.Optional[T.List[str]] = None,
+ command: T.Optional[T.List[str]] = None,
returncode: int = 999, pid: int = -1,
text_mode: bool = True,
input_name: T.Optional[str] = None,
output_name: T.Optional[str] = None,
- command: T.Optional[T.List[str]] = None, cached: bool = False):
+ cached: bool = False):
self.stdout = stdo
self.stderr = stde
self.input_name = input_name
self.output_name = output_name
self.command = command or []
- self.args = args or []
self.cached = cached
self.returncode = returncode
self.pid = pid
@@ -812,7 +811,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
mlog.debug('Compiler stdout:\n', stdo)
mlog.debug('Compiler stderr:\n', stde)
- result = CompileResult(stdo, stde, list(commands), p.returncode, p.pid, input_name=srcname)
+ result = CompileResult(stdo, stde, command_list, p.returncode, p.pid, input_name=srcname)
if want_output:
result.output_name = output
yield result