diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-13 09:19:03 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-19 10:48:48 -0800 |
| commit | 78ec3e21eeebedf6070bb89b05d90735b6d2a242 (patch) | |
| tree | f04ad56bdf6ffb353aafd6ef9b66916c293dea4a /mesonbuild/compilers/compilers.py | |
| parent | 3dff12ab62ac453202ea107922a0a249b24c0925 (diff) | |
| download | meson-78ec3e21eeebedf6070bb89b05d90735b6d2a242.tar.gz | |
compilers: Remove Environment parameter from Compiler.cached_run
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 5f9dc7b0d..cd8716540 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -712,10 +712,10 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): # For now we just accept code as a string, as that's what internal callers # need anyway. If we wanted to accept files, the cache key would need to # include mtime. - def cached_run(self, code: str, env: 'Environment', *, + def cached_run(self, code: str, *, extra_args: T.Union[T.List[str], T.Callable[[CompileCheckMode], T.List[str]], None] = None, dependencies: T.Optional[T.List['Dependency']] = None) -> RunResult: - run_check_cache = env.coredata.run_check_cache + run_check_cache = self.environment.coredata.run_check_cache args = self.build_wrapper_args(extra_args, dependencies, CompileCheckMode('link')) key = (code, tuple(args)) if key in run_check_cache: @@ -728,7 +728,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): mlog.debug('Cached run stdout:\n', p.stdout) mlog.debug('Cached run stderr:\n', p.stderr) else: - p = self.run(code, env, extra_args=extra_args, dependencies=dependencies) + p = self.run(code, self.environment, extra_args=extra_args, dependencies=dependencies) run_check_cache[key] = p return p |
