Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mesonbuild/compilers/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ def get_options(self) -> 'MutableKeyedOptionDictType':
stds += ['c90', 'c1x', 'gnu90', 'gnu1x', 'iso9899:2011']
if version_compare(self.version, '>=1.26.00'):
stds += ['c17', 'c18', 'iso9899:2017', 'iso9899:2018', 'gnu17', 'gnu18']
if version_compare(self.version, '>=1.28.00'):
stds += ['c2x', 'gnu2x', 'c23', 'gnu23']
key = self.form_compileropt_key('std')
std_opt = opts[key]
assert isinstance(std_opt, options.UserStdOption), 'for mypy'
Expand Down
4 changes: 3 additions & 1 deletion mesonbuild/compilers/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ def get_options(self) -> 'MutableKeyedOptionDictType':
cpp_stds += ['c++2a']
if version_compare(self.version, '>=1.26.00'):
cpp_stds += ['c++20']
if version_compare(self.version, '>=1.28.00'):
cpp_stds += ['c++23']

key = self.form_compileropt_key('std')
std_opt = opts[key]
Expand Down Expand Up @@ -656,7 +658,7 @@ def get_option_compile_args(self, target: 'BuildTarget', env: 'Environment', sub
non_msvc_eh_options(eh, args)

debugstl = self.get_compileropt_value('debugstl', env, target, subproject)
assert isinstance(debugstl, str)
assert isinstance(debugstl, bool)
if debugstl:
args.append('-D_GLIBCXX_DEBUG=1')
return args
Expand Down
5 changes: 5 additions & 0 deletions mesonbuild/compilers/fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ def get_options(self) -> 'MutableKeyedOptionDictType':
def get_module_outdir_args(self, path: str) -> T.List[str]:
return ['-J' + path]

def language_stdlib_only_link_flags(self) -> T.List[str]:
# No need to add search paths here, because LCC ships everything
# (C, C++, Fortran) and always knows where to look for its stuff
return ['-lgfortran', '-lm']


class G95FortranCompiler(FortranCompiler):

Expand Down
4 changes: 4 additions & 0 deletions mesonbuild/compilers/mixins/elbrus.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ def get_option_std_args(self, target: BuildTarget, env: Environment, subproject:

def openmp_flags(self, env: Environment) -> T.List[str]:
return ['-fopenmp']

@classmethod
def use_linker_args(cls, linker: str, version: str) -> T.List[str]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I assume this is the change you actually need? The version_compare changes don't look relevant to building numpy.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just grabbed all changes related to e2k from git log. Would you like me te remove version_compare ones from the PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I just wanted to make sure - you can leave the PR as is. I'm on holiday now, but will try to integrte this when I'm back.

return []