diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-13 09:24:26 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-19 10:48:48 -0800 |
| commit | 40b4151f33ea05f1f305f09831c24caa8a920a19 (patch) | |
| tree | bbce1aaf6978f7c9331bea51de65d2eec0471155 /mesonbuild/compilers/cpp.py | |
| parent | e848d8f223db1c2db2f0ced86b652a4d74644377 (diff) | |
| download | meson-40b4151f33ea05f1f305f09831c24caa8a920a19.tar.gz | |
compilers: Remove Environment parameter from Compiler.has_header_symbol
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
| -rw-r--r-- | mesonbuild/compilers/cpp.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 421046150..27461449d 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -94,12 +94,11 @@ class CPPCompiler(CLikeCompiler, Compiler): # too strict without this and always fails. return super().get_compiler_check_args(mode) + ['-fpermissive'] - def has_header_symbol(self, hname: str, symbol: str, prefix: str, - env: 'Environment', *, + def has_header_symbol(self, hname: str, symbol: str, prefix: str, *, extra_args: T.Union[None, T.List[str], T.Callable[[CompileCheckMode], T.List[str]]] = None, dependencies: T.Optional[T.List['Dependency']] = None) -> T.Tuple[bool, bool]: # Check if it's a C-like symbol - found, cached = super().has_header_symbol(hname, symbol, prefix, env, + found, cached = super().has_header_symbol(hname, symbol, prefix, extra_args=extra_args, dependencies=dependencies) if found: @@ -185,7 +184,7 @@ class _StdCPPLibMixin(CompilerMixinBase): def language_stdlib_provider(self, env: Environment) -> str: # https://stackoverflow.com/a/31658120 header = 'version' if self.has_header('version', '', env)[0] else 'ciso646' - is_libcxx = self.has_header_symbol(header, '_LIBCPP_VERSION', '', env)[0] + is_libcxx = self.has_header_symbol(header, '_LIBCPP_VERSION', '')[0] lib = 'c++' if is_libcxx else 'stdc++' return lib |
