diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2018-03-19 23:30:00 +0300 |
---|---|---|
committer | makise-homura <akemi_homura@kurisa.ch> | 2018-03-19 23:30:00 +0300 |
commit | 7cc41baa98e486d6fd08ca5bb6f336481b757c4a (patch) | |
tree | 92c0252fc70b6ef8dbb21272ffe212d17b8ce64f /mesonbuild/compilers/cpp.py | |
parent | 22a83817c8685733adaa94c21b9b248b3e62f5f8 (diff) | |
download | meson-7cc41baa98e486d6fd08ca5bb6f336481b757c4a.zip meson-7cc41baa98e486d6fd08ca5bb6f336481b757c4a.tar.gz meson-7cc41baa98e486d6fd08ca5bb6f336481b757c4a.tar.bz2 |
Added Elbrus lcc compilers support as inheritance from gcc ones
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r-- | mesonbuild/compilers/cpp.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index c10f38e..fd09e46 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -25,6 +25,7 @@ from .compilers import ( msvc_winlibs, ClangCompiler, GnuCompiler, + ElbrusCompiler, IntelCompiler, ) @@ -133,6 +134,21 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler): return ['-fpch-preprocess', '-include', os.path.basename(header)] +class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler): + def __init__(self, exelist, version, gcc_type, is_cross, exe_wrapper=None, defines=None, **kwargs): + GnuCPPCompiler.__init__(self, exelist, version, gcc_type, is_cross, exe_wrapper, defines, **kwargs) + ElbrusCompiler.__init__(self, gcc_type, defines) + + # It does not support c++/gnu++ 17 and 1z, but still does support 0x, 1y, and gnu++98. + def get_options(self): + opts = super().get_options() + opts['cpp_std'] = coredata.UserComboOption('cpp_std', 'C++ language standard to use', + ['none', 'c++98', 'c++03', 'c++0x', 'c++11', 'c++14', 'c++1y', + 'gnu++98', 'gnu++03', 'gnu++0x', 'gnu++11', 'gnu++14', 'gnu++1y'], + 'none') + return opts + + class IntelCPPCompiler(IntelCompiler, CPPCompiler): def __init__(self, exelist, version, icc_type, is_cross, exe_wrap, **kwargs): CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs) |