diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2020-01-13 17:11:20 +0300 |
---|---|---|
committer | makise-homura <akemi_homura@kurisa.ch> | 2020-01-27 22:35:26 +0300 |
commit | 7321cc776afb313326e6cb1596527ef04af9aedb (patch) | |
tree | cf73799771d118b036ccc069e6171b43e12d82c2 | |
parent | a493761d89d87e06e787492ba7f9685df6578902 (diff) | |
download | meson-7321cc776afb313326e6cb1596527ef04af9aedb.zip meson-7321cc776afb313326e6cb1596527ef04af9aedb.tar.gz meson-7321cc776afb313326e6cb1596527ef04af9aedb.tar.bz2 |
Fix missing 'defines' argumet for Elbrus compiler
...But somehow it still remains in C++ compiler.
-rw-r--r-- | mesonbuild/compilers/c.py | 6 | ||||
-rw-r--r-- | mesonbuild/compilers/cpp.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/fortran.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/mixins/elbrus.py | 2 | ||||
-rw-r--r-- | mesonbuild/environment.py | 15 |
5 files changed, 17 insertions, 10 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index d9d81d6..10114fa 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -231,10 +231,10 @@ class PGICCompiler(PGICompiler, CCompiler): class ElbrusCCompiler(GnuCCompiler, ElbrusCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, - is_cross, info: 'MachineInfo', exe_wrapper=None, defines=None, **kwargs): + is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): GnuCCompiler.__init__(self, exelist, version, for_machine, is_cross, - info, exe_wrapper, defines, **kwargs) - ElbrusCompiler.__init__(self, defines) + info, exe_wrapper, **kwargs) + ElbrusCompiler.__init__(self) # It does support some various ISO standards and c/gnu 90, 9x, 1x in addition to those which GNU CC supports. def get_options(self): diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index a09c611..2ed969a 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -325,7 +325,7 @@ class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler): GnuCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, defines, **kwargs) - ElbrusCompiler.__init__(self, defines) + ElbrusCompiler.__init__(self) # It does not support c++/gnu++ 17 and 1z, but still does support 0x, 1y, and gnu++98. def get_options(self): diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 73a8e24..a83c17f 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -215,7 +215,7 @@ class ElbrusFortranCompiler(GnuFortranCompiler, ElbrusCompiler): GnuFortranCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, defines, **kwargs) - ElbrusCompiler.__init__(self, defines) + ElbrusCompiler.__init__(self) class G95FortranCompiler(FortranCompiler): diff --git a/mesonbuild/compilers/mixins/elbrus.py b/mesonbuild/compilers/mixins/elbrus.py index 87bf52a..1420474 100644 --- a/mesonbuild/compilers/mixins/elbrus.py +++ b/mesonbuild/compilers/mixins/elbrus.py @@ -29,7 +29,7 @@ if T.TYPE_CHECKING: class ElbrusCompiler(GnuLikeCompiler): # Elbrus compiler is nearly like GCC, but does not support # PCH, LTO, sanitizers and color output as of version 1.21.x. - def __init__(self, defines: T.Dict[str, str]): + def __init__(self): super().__init__() self.id = 'lcc' self.base_options = ['b_pgo', 'b_coverage', diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 58c9e99..da670f3 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -939,10 +939,17 @@ class Environment: cls = GnuCCompiler if lang == 'c' else GnuCPPCompiler linker = self._guess_nix_linker(compiler, cls, for_machine) - return cls( - ccache + compiler, version, for_machine, is_cross, - info, exe_wrap, defines, full_version=full_version, - linker=linker) + + if lang == 'c': # There's no 'defines' anymore in C Compiler classes. + return cls( + ccache + compiler, version, for_machine, is_cross, + info, exe_wrap, full_version=full_version, + linker=linker) + else: + return cls( + ccache + compiler, version, for_machine, is_cross, + info, exe_wrap, defines, full_version=full_version, + linker=linker) if 'Emscripten' in out: cls = EmscriptenCCompiler if lang == 'c' else EmscriptenCPPCompiler |