mirror of
https://gitlab.freedesktop.org/emersion/libdisplay-info.git
synced 2024-12-25 21:59:08 +01:00
build: set symbol visibility
A simple version script is used because it allows us to consistently expose all symbols starting with "di_", removing the risk to forget to mark a symbol as public. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
c383417629
commit
a4d2bbf95f
2 changed files with 11 additions and 0 deletions
6
libdisplay-info.map
Normal file
6
libdisplay-info.map
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
global:
|
||||||
|
di_*;
|
||||||
|
local:
|
||||||
|
*;
|
||||||
|
};
|
|
@ -27,6 +27,9 @@ add_project_arguments(cc.get_supported_arguments([
|
||||||
'-Werror=implicit',
|
'-Werror=implicit',
|
||||||
]), language: 'c')
|
]), language: 'c')
|
||||||
|
|
||||||
|
symbols_file = 'libdisplay-info.map'
|
||||||
|
symbols_flag = '-Wl,--version-script,@0@'.format(meson.current_source_dir() / symbols_file)
|
||||||
|
|
||||||
di_lib = library(
|
di_lib = library(
|
||||||
'display-info',
|
'display-info',
|
||||||
[
|
[
|
||||||
|
@ -34,6 +37,8 @@ di_lib = library(
|
||||||
'info.c',
|
'info.c',
|
||||||
],
|
],
|
||||||
include_directories: include_directories('include'),
|
include_directories: include_directories('include'),
|
||||||
|
link_args: symbols_flag,
|
||||||
|
link_depends: symbols_file,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue