Skip to content

Commit

Permalink
Correctly determine C++ stds for Elbrus compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
makise-homura authored and jpakkane committed Aug 20, 2020
1 parent 86b4725 commit 1f2150f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions mesonbuild/compilers/cpp.py
Expand Up @@ -365,9 +365,20 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
**kwargs)
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):
opts = CPPCompiler.get_options(self)

cpp_stds = [
'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',
]

if version_compare(self.version, '>=1.24.00'):
cpp_stds += [ 'c++1z', 'c++17', 'gnu++1z', 'gnu++17' ]

if version_compare(self.version, '>=1.25.00'):
cpp_stds += [ 'c++2a', 'gnu++2a' ]

opts.update({
'eh': coredata.UserComboOption(
'C++ exception handling type.',
Expand All @@ -376,10 +387,7 @@ def get_options(self):
),
'std': coredata.UserComboOption(
'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',
],
cpp_stds,
'none',
),
'debugstl': coredata.UserBooleanOption(
Expand Down

0 comments on commit 1f2150f

Please sign in to comment.