From 5b2bdb4fcf7a685744876173c0ccabc014344b04 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 12 Nov 2025 09:56:02 -0800 Subject: compilers: Remove Environment parameter from Compiler.get_assert_args --- mesonbuild/compilers/cpp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index eef39a75d..5f97c566a 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -309,7 +309,7 @@ class ClangCPPCompiler(_StdCPPLibMixin, ClangCPPStds, ClangCompiler, CPPCompiler return libs return [] - def get_assert_args(self, disable: bool, env: 'Environment') -> T.List[str]: + def get_assert_args(self, disable: bool) -> T.List[str]: if disable: return ['-DNDEBUG'] @@ -318,7 +318,7 @@ class ClangCPPCompiler(_StdCPPLibMixin, ClangCPPStds, ClangCompiler, CPPCompiler if self.defines.get(macro) is not None: return [] - if self.language_stdlib_provider(env) == 'stdc++': + if self.language_stdlib_provider(self.environment) == 'stdc++': return ['-D_GLIBCXX_ASSERTIONS=1'] return ['-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST'] @@ -511,7 +511,7 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCPPStds, GnuCompiler, CPPCompiler): return libs return [] - def get_assert_args(self, disable: bool, env: 'Environment') -> T.List[str]: + def get_assert_args(self, disable: bool) -> T.List[str]: if disable: return ['-DNDEBUG'] @@ -522,7 +522,7 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCPPStds, GnuCompiler, CPPCompiler): # For GCC, we can assume that the libstdc++ version is the same as # the compiler itself. Anything else isn't supported. - if self.language_stdlib_provider(env) == 'stdc++': + if self.language_stdlib_provider(self.environment) == 'stdc++': return ['-D_GLIBCXX_ASSERTIONS=1'] else: # One can use -stdlib=libc++ with GCC, it just (as of 2025) requires -- cgit v1.2.3