diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-11-27 15:47:16 -0500 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2024-03-15 11:38:54 -0400 |
| commit | c1076241af11f10acac28d771688bb54c6b0b340 (patch) | |
| tree | 337ac789c919fac824f36807f02874396ce669ce /mesonbuild/compilers/objcpp.py | |
| parent | 6b569527bca9354be77769f91a0607cfd692d861 (diff) | |
| download | meson-c1076241af11f10acac28d771688bb54c6b0b340.tar.gz | |
compilers: No need to pass exe_wrapper everywhere
Places where compiler needs it already have access to Environment object
and can use it directly.
This fixes mypy complaining that not all compilers have self.exe_wrapper
in run() method that got moved to base class.
Diffstat (limited to 'mesonbuild/compilers/objcpp.py')
| -rw-r--r-- | mesonbuild/compilers/objcpp.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py index a5664dab4..baf4fb5ca 100644 --- a/mesonbuild/compilers/objcpp.py +++ b/mesonbuild/compilers/objcpp.py @@ -14,7 +14,6 @@ from .mixins.gnu import GnuCompiler, gnu_common_warning_args, gnu_objc_warning_a from .mixins.clang import ClangCompiler if T.TYPE_CHECKING: - from ..programs import ExternalProgram from ..envconfig import MachineInfo from ..environment import Environment from ..linkers.linkers import DynamicLinker @@ -26,13 +25,12 @@ class ObjCPPCompiler(CLikeCompiler, Compiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', - exe_wrap: T.Optional['ExternalProgram'], linker: T.Optional['DynamicLinker'] = None, full_version: T.Optional[str] = None): Compiler.__init__(self, ccache, exelist, version, for_machine, info, is_cross=is_cross, full_version=full_version, linker=linker) - CLikeCompiler.__init__(self, exe_wrap) + CLikeCompiler.__init__(self) @staticmethod def get_display_language() -> str: @@ -46,12 +44,11 @@ class ObjCPPCompiler(CLikeCompiler, Compiler): class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', - exe_wrapper: T.Optional['ExternalProgram'] = None, 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, - info, exe_wrapper, linker=linker, full_version=full_version) + info, linker=linker, full_version=full_version) GnuCompiler.__init__(self, defines) default_warn_args = ['-Wall', '-Winvalid-pch'] self.warn_args = {'0': [], @@ -67,12 +64,11 @@ class ClangObjCPPCompiler(ClangCompiler, ObjCPPCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', - exe_wrapper: T.Optional['ExternalProgram'] = None, 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, - info, exe_wrapper, linker=linker, full_version=full_version) + info, linker=linker, full_version=full_version) ClangCompiler.__init__(self, defines) default_warn_args = ['-Wall', '-Winvalid-pch'] self.warn_args = {'0': [], |
