build: set project, not global, arguments

Global arguments leak into Meson subprojects. Let's not do that.

Specifically, -fvisibility=hidden leaks into a future sub-project
libdisplay-info, where it results the DSO not exporting any symbols.
Libdisplay-info uses a linker script to define the exported symbols and
not visiblity.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2023-04-28 13:56:16 +03:00
parent 8c9dd4febb
commit fefdd577c8
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ global_args = cc.get_supported_arguments(
'-Wundef',
'-fvisibility=hidden',
)
add_global_arguments(global_args, language: 'c')
add_project_arguments(global_args, language: 'c')
if cc.has_header_symbol('sys/sysmacros.h', 'major')
config_h.set('MAJOR_IN_SYSMACROS', 1)