meson: make symbols hidden by default

Now that symbols that should be exported are annotated accordingly, make
all the rest hidden by default.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
main
Lucas De Marchi 2018-09-12 13:24:12 -07:00
parent 67967e9b5c
commit ba808253bc
22 changed files with 31 additions and 28 deletions

View File

@ -31,7 +31,7 @@ libdrm_amdgpu = shared_library(
config_file, config_file,
], ],
c_args : [ c_args : [
warn_c_args, libdrm_c_args,
'-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(join_paths(datadir_amdgpu, 'amdgpu.ids')), '-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(join_paths(datadir_amdgpu, 'amdgpu.ids')),
], ],
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],

View File

@ -30,7 +30,7 @@ libdrm_etnaviv = shared_library(
], ],
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops], dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops],
version : '1.0.0', version : '1.0.0',
install : true, install : true,

View File

@ -21,7 +21,7 @@
libdrm_exynos = shared_library( libdrm_exynos = shared_library(
'drm_exynos', 'drm_exynos',
[files('exynos_drm.c', 'exynos_fimg2d.c'), config_file], [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file],
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
dependencies : [dep_pthread_stubs], dependencies : [dep_pthread_stubs],

View File

@ -42,7 +42,7 @@ endif
libdrm_freedreno = shared_library( libdrm_freedreno = shared_library(
'drm_freedreno', 'drm_freedreno',
[files_freedreno, config_file], [files_freedreno, config_file],
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops], dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops],
link_with : libdrm, link_with : libdrm,

View File

@ -30,7 +30,7 @@ libdrm_intel = shared_library(
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops], dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops],
c_args : warn_c_args, c_args : libdrm_c_args,
version : '1.0.0', version : '1.0.0',
install : true, install : true,
) )
@ -59,7 +59,7 @@ test_decode = executable(
files('test_decode.c'), files('test_decode.c'),
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : [libdrm, libdrm_intel], link_with : [libdrm, libdrm_intel],
c_args : warn_c_args, c_args : libdrm_c_args,
) )
test( test(

View File

@ -44,7 +44,7 @@ endif
libkms = shared_library( libkms = shared_library(
'kms', 'kms',
[files_libkms, config_file], [files_libkms, config_file],
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : libkms_include, include_directories : libkms_include,
link_with : libdrm, link_with : libdrm,
version : '1.0.0', version : '1.0.0',

View File

@ -211,6 +211,9 @@ foreach a : ['unused-parameter', 'attributes', 'long-long',
endif endif
endforeach endforeach
# all c args:
libdrm_c_args = warn_c_args + ['-fvisibility=hidden']
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
dep_cunit = dependency('cunit', version : '>= 2.1', required : false) dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
@ -286,7 +289,7 @@ libdrm = shared_library(
), ),
config_file, config_file,
], ],
c_args : warn_c_args, c_args : libdrm_c_args,
dependencies : [dep_valgrind, dep_rt, dep_m], dependencies : [dep_valgrind, dep_rt, dep_m],
include_directories : inc_drm, include_directories : inc_drm,
version : '2.4.0', version : '2.4.0',

View File

@ -22,7 +22,7 @@
libdrm_nouveau = shared_library( libdrm_nouveau = shared_library(
'drm_nouveau', 'drm_nouveau',
[files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file], [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file],
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
dependencies : [dep_threads, dep_atomic_ops], dependencies : [dep_threads, dep_atomic_ops],

View File

@ -22,7 +22,7 @@ libdrm_omap = shared_library(
'drm_omap', 'drm_omap',
[files('omap_drm.c'), config_file], [files('omap_drm.c'), config_file],
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
c_args : warn_c_args, c_args : libdrm_c_args,
link_with : libdrm, link_with : libdrm,
dependencies : [dep_pthread_stubs, dep_atomic_ops], dependencies : [dep_pthread_stubs, dep_atomic_ops],
version : '1.0.0', version : '1.0.0',

View File

@ -28,7 +28,7 @@ libdrm_radeon = shared_library(
), ),
config_file, config_file,
], ],
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
dependencies : [dep_pthread_stubs, dep_atomic_ops], dependencies : [dep_pthread_stubs, dep_atomic_ops],

View File

@ -24,7 +24,7 @@ libdrm_tegra = shared_library(
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
dependencies : [dep_pthread_stubs, dep_atomic_ops], dependencies : [dep_pthread_stubs, dep_atomic_ops],
c_args : warn_c_args, c_args : libdrm_c_args,
version : '0.0.0', version : '0.0.0',
install : true, install : true,
) )

View File

@ -24,7 +24,7 @@ if with_libkms
exynos_fimg2d_test = executable( exynos_fimg2d_test = executable(
'exynos_fimg2d_test', 'exynos_fimg2d_test',
files('exynos_fimg2d_test.c'), files('exynos_fimg2d_test.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm, inc_exynos, include_directories : [inc_root, inc_drm, inc_exynos,
include_directories('../../libkms')], include_directories('../../libkms')],
link_with : [libdrm, libkms, libdrm_exynos], link_with : [libdrm, libkms, libdrm_exynos],
@ -36,7 +36,7 @@ endif
exynos_fimg2d_perf = executable( exynos_fimg2d_perf = executable(
'exynos_fimg2d_perf', 'exynos_fimg2d_perf',
files('exynos_fimg2d_perf.c'), files('exynos_fimg2d_perf.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm, inc_exynos], include_directories : [inc_root, inc_drm, inc_exynos],
link_with : [libdrm, libdrm_exynos], link_with : [libdrm, libdrm_exynos],
dependencies : dep_threads, dependencies : dep_threads,
@ -46,7 +46,7 @@ exynos_fimg2d_perf = executable(
exynos_fimg2d_event = executable( exynos_fimg2d_event = executable(
'exynos_fimg2d_event', 'exynos_fimg2d_event',
files('exynos_fimg2d_event.c'), files('exynos_fimg2d_event.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_drm, inc_exynos], include_directories : [inc_root, inc_drm, inc_exynos],
link_with : [libdrm, libdrm_exynos], link_with : [libdrm, libdrm_exynos],
dependencies : dep_threads, dependencies : dep_threads,

View File

@ -27,7 +27,7 @@ libkms_test = static_library(
), ),
include_directories : [inc_root, inc_tests, inc_drm], include_directories : [inc_root, inc_tests, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
) )
kms_steal_crtc = executable( kms_steal_crtc = executable(

View File

@ -21,7 +21,7 @@
kmstest = executable( kmstest = executable(
'kmstest', 'kmstest',
files('main.c'), files('main.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [ include_directories : [
inc_root, inc_tests, include_directories('../../libkms'), inc_drm, inc_root, inc_tests, include_directories('../../libkms'), inc_drm,
], ],

View File

@ -53,7 +53,7 @@ drmsl = executable(
files('drmsl.c'), files('drmsl.c'),
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
) )
hash = executable( hash = executable(
@ -61,7 +61,7 @@ hash = executable(
files('hash.c'), files('hash.c'),
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
) )
random = executable( random = executable(
@ -69,7 +69,7 @@ random = executable(
files('random.c'), files('random.c'),
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
) )
drmdevice = executable( drmdevice = executable(
@ -77,7 +77,7 @@ drmdevice = executable(
files('drmdevice.c'), files('drmdevice.c'),
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
) )
test('random', random, timeout : 240) test('random', random, timeout : 240)

View File

@ -21,7 +21,7 @@
modeprint = executable( modeprint = executable(
'modeprint', 'modeprint',
files('modeprint.c'), files('modeprint.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_tests, inc_drm], include_directories : [inc_root, inc_tests, inc_drm],
link_with : libdrm, link_with : libdrm,
dependencies : dep_threads, dependencies : dep_threads,

View File

@ -21,7 +21,7 @@
modetest = executable( modetest = executable(
'modetest', 'modetest',
files('buffers.c', 'cursor.c', 'modetest.c'), files('buffers.c', 'cursor.c', 'modetest.c'),
c_args : [warn_c_args, '-Wno-pointer-arith'], c_args : [libdrm_c_args, '-Wno-pointer-arith'],
include_directories : [inc_root, inc_tests, inc_drm], include_directories : [inc_root, inc_tests, inc_drm],
dependencies : [dep_threads, dep_cairo], dependencies : [dep_threads, dep_cairo],
link_with : [libdrm, libutil], link_with : [libdrm, libutil],

View File

@ -24,7 +24,7 @@ threaded = executable(
dependencies : [dep_dl, dep_threads], dependencies : [dep_dl, dep_threads],
include_directories : [inc_root, inc_drm, include_directories('../../nouveau')], include_directories : [inc_root, inc_drm, include_directories('../../nouveau')],
link_with : [libdrm, libdrm_nouveau], link_with : [libdrm, libdrm_nouveau],
c_args : warn_c_args, c_args : libdrm_c_args,
) )
test('threaded', threaded) test('threaded', threaded)

View File

@ -21,7 +21,7 @@
proptest = executable( proptest = executable(
'proptest', 'proptest',
files('proptest.c'), files('proptest.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_tests, inc_drm], include_directories : [inc_root, inc_tests, inc_drm],
link_with : [libdrm, libutil], link_with : [libdrm, libutil],
install : with_install_tests, install : with_install_tests,

View File

@ -23,5 +23,5 @@ radeon_ttm = executable(
files('rbo.c', 'radeon_ttm.c'), files('rbo.c', 'radeon_ttm.c'),
include_directories : [inc_root, inc_drm], include_directories : [inc_root, inc_drm],
link_with : libdrm, link_with : libdrm,
c_args : warn_c_args, c_args : libdrm_c_args,
) )

View File

@ -22,6 +22,6 @@ openclose = executable(
'openclose', 'openclose',
files('openclose.c'), files('openclose.c'),
include_directories : [inc_root, inc_drm, include_directories('../../tegra')], include_directories : [inc_root, inc_drm, include_directories('../../tegra')],
c_args : warn_c_args, c_args : libdrm_c_args,
link_with : [libdrm, libdrm_tegra], link_with : [libdrm, libdrm_tegra],
) )

View File

@ -21,7 +21,7 @@
vbltest = executable( vbltest = executable(
'vbltest', 'vbltest',
files('vbltest.c'), files('vbltest.c'),
c_args : warn_c_args, c_args : libdrm_c_args,
include_directories : [inc_root, inc_tests, inc_drm], include_directories : [inc_root, inc_tests, inc_drm],
link_with : [libdrm, libutil], link_with : [libdrm, libutil],
install : with_install_tests, install : with_install_tests,