aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-04-18 22:18:35 -0400
committerXavier Claessens <xclaesse@gmail.com>2022-05-09 10:49:04 -0400
commit7c4087ace5b3b1c8669d7afd2b6fbcc0c816f1d4 (patch)
treed907165a47e1c4c8d89ce3520a39b25e42924a70 /mesonbuild/compilers
parentd6e3517e0d8ca11c1d7d77a8db1ed68f32a891a2 (diff)
downloadmeson-7c4087ace5b3b1c8669d7afd2b6fbcc0c816f1d4.zip
meson-7c4087ace5b3b1c8669d7afd2b6fbcc0c816f1d4.tar.gz
meson-7c4087ace5b3b1c8669d7afd2b6fbcc0c816f1d4.tar.bz2
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.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/mixins/gnu.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py
index 2613038..1b1e8a1 100644
--- a/mesonbuild/compilers/mixins/gnu.py
+++ b/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]: