From 129867d743e78dc410d24e503ddfeb2b432db5aa Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 4 Jan 2022 23:42:03 -0500 Subject: [PATCH] meson: fix incorrect use of global arguments to set symbol visibility add_global_arguments applies to all subprojects, or more usually, fails. The meson docs suggest that add_project_arguments is probably preferable for this reason. However, in this case it should only be applied to a single library as a workaround for supporting older versions of meson. Move it to a per-target c_args instead, for the same effect. --- src/lib/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/meson.build b/src/lib/meson.build index e070c37..cae5058 100644 --- a/src/lib/meson.build +++ b/src/lib/meson.build @@ -1,5 +1,4 @@ lib_sources = files() -add_global_arguments('-fvisibility=hidden', language : 'c') subdir('buzhash') subdir('comp') subdir('hash') @@ -8,6 +7,8 @@ subdir('dl') lib_sources += files('zck.c', 'header.c', 'io.c', 'log.c', 'compint.c', 'error.c') zcklib = library('zck', lib_sources, + # in meson 0.48, use `gnu_symbol_visibility: 'hidden'` kwarg + c_args: ['-fvisibility=hidden'], include_directories: inc, dependencies: [zstd_dep, openssl_dep], install: true, -- 2.30.2