From 2c0fbe161d61d2d15d29892456544442ab1c4ff6 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 21 Sep 2020 10:38:17 -0700 Subject: compilers: make is_cross part of the base Compiler class Every class needs to set this, so it should be part of the base. For classes that require is_cross, the positional argument remains in their signature. For those that don't, they just allow the base class to set their value to it's default of False. --- mesonbuild/compilers/cpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 3a27e7a..b5dbdda 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -65,8 +65,8 @@ class CPPCompiler(CLikeCompiler, Compiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', exe_wrap: T.Optional[str] = None, **kwargs): # If a child ObjCPP class has already set it, don't set it ourselves - Compiler.__init__(self, exelist, version, for_machine, info, **kwargs) - CLikeCompiler.__init__(self, is_cross, exe_wrap) + Compiler.__init__(self, exelist, version, for_machine, info, is_cross=is_cross, **kwargs) + CLikeCompiler.__init__(self, exe_wrap) @staticmethod def get_display_language(): -- cgit v1.1