compilers/gnu: demote visibilty inlineshidden to hidden for unsupported compilers

This option is only valid for C++ and ObjC++, but the kwarg is useful
for mixed language targets. Asking for inlines as well, when the
compiler driver is trying to build the C components of a target, results
in gcc emitting:

```
cc1: warning: command-line option ‘-fvisibility-inlines-hidden’ is valid for C++/ObjC++ but not for C
```

Squelch this warning by filtering it out on Meson's side of things.
pull/10380/head
Eli Schwartz 3 years ago committed by Xavier Claessens
parent d6e3517e0d
commit 7c4087ace5
  1. 2
      mesonbuild/compilers/mixins/gnu.py

@ -190,6 +190,8 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta):
pass
def gnu_symbol_visibility_args(self, vistype: str) -> T.List[str]:
if vistype == 'inlineshidden' and self.language not in {'cpp', 'objcpp'}:
vistype = 'hidden'
return gnu_symbol_visibility_args[vistype]
def gen_vs_module_defs_args(self, defsfile: str) -> T.List[str]:

Loading…
Cancel
Save