summaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2023-07-12 17:58:35 -0500
committerTristan Partin <tristan@partin.io>2023-07-12 18:56:06 -0500
commitc1863f781bf56190ff00f081733c2cb1f2f73884 (patch)
treea325534a0de9636b1d8395293b62b6d1bcab7bcb /mesonbuild
parent33c8362a1cdd57dd60c7be8fdf3b0566ccdeb3bf (diff)
downloadmeson-c1863f781bf56190ff00f081733c2cb1f2f73884.tar.gz
Remove Compiler._build_wrapper(temp_dir:)
The function wasn't using the keyword argument and all the callers were using env.scratch_dir anyway.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers/compilers.py3
-rw-r--r--mesonbuild/compilers/mixins/clike.py6
2 files changed, 4 insertions, 5 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 7873ea8a9..4cbdb1fc9 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1299,8 +1299,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
extra_args: T.Union[None, CompilerArgs, T.List[str], T.Callable[[CompileCheckMode], T.List[str]]] = None,
dependencies: T.Optional[T.List['Dependency']] = None,
mode: CompileCheckMode = CompileCheckMode.COMPILE, want_output: bool = False,
- disable_cache: bool = False,
- temp_dir: str = None) -> T.Iterator[T.Optional[CompileResult]]:
+ disable_cache: bool = False) -> T.Iterator[T.Optional[CompileResult]]:
"""Helper for getting a cached value when possible.
This method isn't meant to be called externally, it's mean to be
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 978c05868..da361856c 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -680,7 +680,7 @@ class CLikeCompiler(Compiler):
mode=CompileCheckMode.PREPROCESS).to_native()
func = functools.partial(self.cached_compile, code, env.coredata, extra_args=args, mode=CompileCheckMode.PREPROCESS)
if disable_cache:
- func = functools.partial(self.compile, code, extra_args=args, mode=CompileCheckMode.PREPROCESS, temp_dir=env.scratch_dir)
+ func = functools.partial(self.compile, code, extra_args=args, mode=CompileCheckMode.PREPROCESS)
with func() as p:
cached = p.cached
if p.returncode != 0:
@@ -919,7 +919,7 @@ class CLikeCompiler(Compiler):
'''
args = self.get_compiler_check_args(CompileCheckMode.COMPILE)
n = '_symbols_have_underscore_prefix_searchbin'
- with self._build_wrapper(code, env, extra_args=args, mode=CompileCheckMode.COMPILE, want_output=True, temp_dir=env.scratch_dir) as p:
+ with self._build_wrapper(code, env, extra_args=args, mode=CompileCheckMode.COMPILE, want_output=True) as p:
if p.returncode != 0:
raise RuntimeError(f'BUG: Unable to compile {n!r} check: {p.stderr}')
if not os.path.isfile(p.output_name):
@@ -954,7 +954,7 @@ class CLikeCompiler(Compiler):
#endif
{delim}MESON_UNDERSCORE_PREFIX
'''
- with self._build_wrapper(code, env, mode=CompileCheckMode.PREPROCESS, want_output=False, temp_dir=env.scratch_dir) as p:
+ with self._build_wrapper(code, env, mode=CompileCheckMode.PREPROCESS, want_output=False) as p:
if p.returncode != 0:
raise RuntimeError(f'BUG: Unable to preprocess _symbols_have_underscore_prefix_define check: {p.stdout}')
symbol_prefix = p.stdout.partition(delim)[-1].rstrip()