aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormakise-homura <akemi_homura@kurisa.ch>2021-09-28 23:26:31 +0300
committerDylan Baker <dylan@pnwbakers.com>2021-09-29 20:16:02 -0700
commitd9b379df87815b9ffddfb1d146d6201dc4df7a48 (patch)
tree37ad2b4ad428df42c135bb893e029becb4973d54
parentfc3de287cbcd38fdbd06e1a81bb9a8d4ccd0c008 (diff)
downloadmeson-d9b379df87815b9ffddfb1d146d6201dc4df7a48.zip
meson-d9b379df87815b9ffddfb1d146d6201dc4df7a48.tar.gz
meson-d9b379df87815b9ffddfb1d146d6201dc4df7a48.tar.bz2
compilers/elbrus: Fix incorrect inheritance model of Elbrus*Compiler
-rw-r--r--mesonbuild/compilers/c.py8
-rw-r--r--mesonbuild/compilers/cpp.py7
-rw-r--r--mesonbuild/compilers/fortran.py7
-rw-r--r--mesonbuild/compilers/mixins/elbrus.py5
4 files changed, 14 insertions, 13 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 33d6148..a096442 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -323,15 +323,14 @@ class NvidiaHPC_CCompiler(PGICompiler, CCompiler):
self.id = 'nvidia_hpc'
-class ElbrusCCompiler(GnuCCompiler, ElbrusCompiler):
+class ElbrusCCompiler(ElbrusCompiler, CCompiler):
def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool,
info: 'MachineInfo', exe_wrapper: T.Optional['ExternalProgram'] = None,
linker: T.Optional['DynamicLinker'] = None,
defines: T.Optional[T.Dict[str, str]] = None,
full_version: T.Optional[str] = None):
- GnuCCompiler.__init__(self, exelist, version, for_machine, is_cross,
- info, exe_wrapper, defines=defines,
- linker=linker, full_version=full_version)
+ CCompiler.__init__(self, exelist, version, for_machine, is_cross,
+ info, exe_wrapper, linker=linker, full_version=full_version)
ElbrusCompiler.__init__(self)
# It does support some various ISO standards and c/gnu 90, 9x, 1x in addition to those which GNU CC supports.
@@ -356,7 +355,6 @@ class ElbrusCCompiler(GnuCCompiler, ElbrusCompiler):
extra_args=extra_args,
dependencies=dependencies)
-
class IntelCCompiler(IntelGnuLikeCompiler, CCompiler):
def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool,
info: 'MachineInfo', exe_wrapper: T.Optional['ExternalProgram'] = None,
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 6cbc265..50417ee 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -449,15 +449,14 @@ class NvidiaHPC_CPPCompiler(PGICompiler, CPPCompiler):
self.id = 'nvidia_hpc'
-class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler):
+class ElbrusCPPCompiler(ElbrusCompiler, CPPCompiler):
def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool,
info: 'MachineInfo', exe_wrapper: T.Optional['ExternalProgram'] = None,
linker: T.Optional['DynamicLinker'] = None,
defines: T.Optional[T.Dict[str, str]] = None,
full_version: T.Optional[str] = None):
- GnuCPPCompiler.__init__(self, exelist, version, for_machine, is_cross,
- info, exe_wrapper, linker=linker,
- full_version=full_version, defines=defines)
+ CPPCompiler.__init__(self, exelist, version, for_machine, is_cross,
+ info, exe_wrapper, linker=linker, full_version=full_version)
ElbrusCompiler.__init__(self)
def get_options(self) -> 'KeyedOptionDictType':
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
index 5d72f4b..9c435cd 100644
--- a/mesonbuild/compilers/fortran.py
+++ b/mesonbuild/compilers/fortran.py
@@ -237,15 +237,14 @@ class GnuFortranCompiler(GnuCompiler, FortranCompiler):
dependencies=dependencies, mode='preprocess', disable_cache=disable_cache)
-class ElbrusFortranCompiler(GnuFortranCompiler, ElbrusCompiler):
+class ElbrusFortranCompiler(ElbrusCompiler, FortranCompiler):
def __init__(self, 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):
- GnuFortranCompiler.__init__(self, exelist, version, for_machine, is_cross,
- info, exe_wrapper, defines=defines,
- linker=linker, full_version=full_version)
+ FortranCompiler.__init__(self, exelist, version, for_machine, is_cross,
+ info, exe_wrapper, linker=linker, full_version=full_version)
ElbrusCompiler.__init__(self)
class G95FortranCompiler(FortranCompiler):
diff --git a/mesonbuild/compilers/mixins/elbrus.py b/mesonbuild/compilers/mixins/elbrus.py
index 16f6210..20ba88e 100644
--- a/mesonbuild/compilers/mixins/elbrus.py
+++ b/mesonbuild/compilers/mixins/elbrus.py
@@ -35,6 +35,11 @@ class ElbrusCompiler(GnuLikeCompiler):
super().__init__()
self.id = 'lcc'
self.base_options = {OptionKey(o) for o in ['b_pgo', 'b_coverage', 'b_ndebug', 'b_staticpic', 'b_lundef', 'b_asneeded']}
+ default_warn_args = ['-Wall']
+ self.warn_args = {'0': [],
+ '1': default_warn_args,
+ '2': default_warn_args + ['-Wextra'],
+ '3': default_warn_args + ['-Wextra', '-Wpedantic']}
# FIXME: use _build_wrapper to call this so that linker flags from the env
# get applied