aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authormakise-homura <akemi_homura@kurisa.ch>2020-01-13 17:11:20 +0300
committermakise-homura <akemi_homura@kurisa.ch>2020-01-27 22:35:26 +0300
commit7321cc776afb313326e6cb1596527ef04af9aedb (patch)
treecf73799771d118b036ccc069e6171b43e12d82c2 /mesonbuild/environment.py
parenta493761d89d87e06e787492ba7f9685df6578902 (diff)
downloadmeson-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.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py15
1 files changed, 11 insertions, 4 deletions
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