Skip to content

Commit

Permalink
meson: set the symbol visibility of the shared library to hidden
Browse files Browse the repository at this point in the history
This matches the Makefile build. Due to one private xxhash symbol in use
by the program, it recompiles a private copy of xxhash.

Ref. #2261
  • Loading branch information
eli-schwartz committed Aug 9, 2021
1 parent e37f197 commit d649ae0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/meson/lib/meson.build
Expand Up @@ -108,6 +108,7 @@ libzstd = library('zstd',
libzstd_sources,
include_directories: libzstd_includes,
c_args: libzstd_c_args,
gnu_symbol_visibility: 'hidden',
dependencies: libzstd_deps,
install: true,
version: zstd_libversion)
Expand Down
2 changes: 1 addition & 1 deletion build/meson/meson.build
Expand Up @@ -19,7 +19,7 @@ project('zstd',
'werror=true'
],
version: 'DUMMY',
meson_version: '>=0.47.0')
meson_version: '>=0.48.0')

cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
Expand Down
4 changes: 3 additions & 1 deletion build/meson/programs/meson.build
Expand Up @@ -18,7 +18,9 @@ zstd_programs_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'),
join_paths(zstd_rootdir, 'programs/benchzstd.c'),
join_paths(zstd_rootdir, 'programs/datagen.c'),
join_paths(zstd_rootdir, 'programs/dibio.c'),
join_paths(zstd_rootdir, 'programs/zstdcli_trace.c')]
join_paths(zstd_rootdir, 'programs/zstdcli_trace.c'),
# needed due to use of private symbol + -fvisibility=hidden
join_paths(zstd_rootdir, 'lib/common/xxhash.c')]

zstd_c_args = libzstd_debug_cflags
if use_multi_thread
Expand Down

0 comments on commit d649ae0

Please sign in to comment.