From fc93ef0370dc2e4cb44fe4abf5729be3e3e3a6c3 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 31 Oct 2025 10:42:07 -0700 Subject: compilers: Stop passing `is_cross` This is calculated by `Environment().is_cross_build(for_machine)`. Since we have that in the Compiler class, just calculate it in the Compiler initializer --- mesonbuild/compilers/objcpp.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'mesonbuild/compilers/objcpp.py') diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py index d205dd1fc..df71de3c9 100644 --- a/mesonbuild/compilers/objcpp.py +++ b/mesonbuild/compilers/objcpp.py @@ -27,12 +27,11 @@ class ObjCPPCompiler(CLikeCompiler, Compiler): language = 'objcpp' def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, - is_cross: bool, env: Environment, + env: Environment, linker: T.Optional['DynamicLinker'] = None, full_version: T.Optional[str] = None): Compiler.__init__(self, ccache, exelist, version, for_machine, env, - is_cross=is_cross, full_version=full_version, - linker=linker) + full_version=full_version, linker=linker) CLikeCompiler.__init__(self) def form_compileropt_key(self, basename: str) -> OptionKey: @@ -64,11 +63,11 @@ class ObjCPPCompiler(CLikeCompiler, Compiler): class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, - is_cross: bool, env: Environment, + env: Environment, defines: T.Optional[T.Dict[str, str]] = None, linker: T.Optional['DynamicLinker'] = None, full_version: T.Optional[str] = None): - ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross, + ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, env, linker=linker, full_version=full_version) GnuCompiler.__init__(self, defines) default_warn_args = ['-Wall', '-Winvalid-pch'] @@ -95,11 +94,11 @@ class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler): class ClangObjCPPCompiler(ClangCPPStds, ClangCompiler, ObjCPPCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, - is_cross: bool, env: Environment, + env: Environment, defines: T.Optional[T.Dict[str, str]] = None, linker: T.Optional['DynamicLinker'] = None, full_version: T.Optional[str] = None): - ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross, + ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, env, linker=linker, full_version=full_version) ClangCompiler.__init__(self, defines) default_warn_args = ['-Wall', '-Winvalid-pch'] -- cgit v1.2.3