diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-12 09:56:02 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-19 10:48:48 -0800 |
| commit | 5b2bdb4fcf7a685744876173c0ccabc014344b04 (patch) | |
| tree | effddad42cc8c9995db2f73dc83ce556c6a11b24 /mesonbuild/compilers/cpp.py | |
| parent | e8286ab9a102823cb256bd859de1a9082679e79b (diff) | |
| download | meson-5b2bdb4fcf7a685744876173c0ccabc014344b04.tar.gz | |
compilers: Remove Environment parameter from Compiler.get_assert_args
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
| -rw-r--r-- | mesonbuild/compilers/cpp.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |
