summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-13 01:13:23 +0000
committerEli Schwartz <eschwartz93@gmail.com>2024-03-28 00:52:25 -0400
commit5bd28febf7887eebc8e55aa6e39962ae7da51281 (patch)
tree46babf1dcb5d3e1665f50028b93ecaacc5475df1 /mesonbuild/compilers/compilers.py
parent31314419aac57c45d82578700051f6ed999176af (diff)
downloadmeson-5bd28febf7887eebc8e55aa6e39962ae7da51281.tar.gz
Pass Environment down from Backend
We'll need it in a moment for get_base_compile_args -> get_assert_args. Bug: https://github.com/mesonbuild/meson/issues/12962 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 5854c9e60..58941b70d 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -283,7 +283,7 @@ def are_asserts_disabled(options: KeyedOptionDictType) -> bool:
options[OptionKey('buildtype')].value in {'release', 'plain'}))
-def get_base_compile_args(options: 'KeyedOptionDictType', compiler: 'Compiler') -> T.List[str]:
+def get_base_compile_args(options: 'KeyedOptionDictType', compiler: 'Compiler', env: 'Environment') -> T.List[str]:
args: T.List[str] = []
try:
if options[OptionKey('b_lto')].value:
@@ -314,7 +314,7 @@ def get_base_compile_args(options: 'KeyedOptionDictType', compiler: 'Compiler')
except KeyError:
pass
try:
- args += compiler.get_assert_args(are_asserts_disabled(options))
+ args += compiler.get_assert_args(are_asserts_disabled(options), env)
except KeyError:
pass
# This does not need a try...except
@@ -1060,7 +1060,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
def get_coverage_link_args(self) -> T.List[str]:
return self.linker.get_coverage_args()
- def get_assert_args(self, disable: bool) -> T.List[str]:
+ def get_assert_args(self, disable: bool, env: 'Environment') -> T.List[str]:
"""Get arguments to enable or disable assertion.
:param disable: Whether to disable assertions