aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/objcpp.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-10-09 19:53:56 +0300
committerGitHub <noreply@github.com>2019-10-09 19:53:56 +0300
commitb6af3f38102d57197fbd365d1b2fa57a56c5f457 (patch)
tree775136954b65915f2c0b6ee9fc25dd4d90e06780 /mesonbuild/compilers/objcpp.py
parentf64d9b43802762ec10acf16d719fa261b85079ad (diff)
parentafbed79baa579a1d3550631168c0810a5d0f522c (diff)
downloadmeson-b6af3f38102d57197fbd365d1b2fa57a56c5f457.zip
meson-b6af3f38102d57197fbd365d1b2fa57a56c5f457.tar.gz
meson-b6af3f38102d57197fbd365d1b2fa57a56c5f457.tar.bz2
Merge pull request #5833 from dcbaker/remove-compiler-type
Remove compiler type
Diffstat (limited to 'mesonbuild/compilers/objcpp.py')
-rw-r--r--mesonbuild/compilers/objcpp.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py
index 70a86c5..5dab8b0 100644
--- a/mesonbuild/compilers/objcpp.py
+++ b/mesonbuild/compilers/objcpp.py
@@ -22,10 +22,15 @@ from .compilers import Compiler
from .mixins.gnu import GnuCompiler
from .mixins.clang import ClangCompiler
+if typing.TYPE_CHECKING:
+ from ..envconfig import MachineInfo
+
class ObjCPPCompiler(CLikeCompiler, Compiler):
- def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, exe_wrap: typing.Optional[str], **kwargs):
+ def __init__(self, exelist, version, for_machine: MachineChoice,
+ is_cross: bool, info: 'MachineInfo',
+ exe_wrap: typing.Optional[str], **kwargs):
self.language = 'objcpp'
- Compiler.__init__(self, exelist, version, for_machine, **kwargs)
+ Compiler.__init__(self, exelist, version, for_machine, info, **kwargs)
CLikeCompiler.__init__(self, is_cross, exe_wrap)
def get_display_language(self):
@@ -58,9 +63,11 @@ class ObjCPPCompiler(CLikeCompiler, Compiler):
class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler):
- def __init__(self, exelist, version, compiler_type, for_machine: MachineChoice, is_cross, exe_wrapper=None, defines=None, **kwargs):
- ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrapper, **kwargs)
- GnuCompiler.__init__(self, compiler_type, defines)
+ def __init__(self, exelist, version, for_machine: MachineChoice,
+ is_cross, info: 'MachineInfo', exe_wrapper=None,
+ defines=None, **kwargs):
+ ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs)
+ GnuCompiler.__init__(self, defines)
default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor']
self.warn_args = {'0': [],
'1': default_warn_args,
@@ -69,9 +76,11 @@ class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler):
class ClangObjCPPCompiler(ClangCompiler, ObjCPPCompiler):
- def __init__(self, exelist, version, compiler_type, for_machine: MachineChoice, is_cross, exe_wrapper=None, **kwargs):
- ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrapper, **kwargs)
- ClangCompiler.__init__(self, compiler_type)
+ def __init__(self, exelist, version, for_machine: MachineChoice,
+ is_cross, info: 'MachineInfo', exe_wrapper=None,
+ **kwargs):
+ ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs)
+ ClangCompiler.__init__(self)
default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor']
self.warn_args = {'0': [],
'1': default_warn_args,