[PATCH libdrm v2 12/13] meson: make symbols hidden by default

Dylan Baker dylan at pnwbakers.com
Fri Sep 14 16:21:36 UTC 2018


Quoting Lucas De Marchi (2018-09-13 16:57:23)
> 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 at intel.com>
> ---
>  amdgpu/meson.build          | 2 +-
>  etnaviv/meson.build         | 2 +-
>  exynos/meson.build          | 2 +-
>  freedreno/meson.build       | 2 +-
>  intel/meson.build           | 4 ++--
>  libkms/meson.build          | 2 +-
>  meson.build                 | 5 ++++-
>  nouveau/meson.build         | 2 +-
>  omap/meson.build            | 2 +-
>  radeon/meson.build          | 2 +-
>  tegra/meson.build           | 2 +-
>  tests/exynos/meson.build    | 6 +++---
>  tests/kms/meson.build       | 2 +-
>  tests/kmstest/meson.build   | 2 +-
>  tests/meson.build           | 8 ++++----
>  tests/modeprint/meson.build | 2 +-
>  tests/modetest/meson.build  | 2 +-
>  tests/nouveau/meson.build   | 2 +-
>  tests/proptest/meson.build  | 2 +-
>  tests/radeon/meson.build    | 2 +-
>  tests/tegra/meson.build     | 2 +-
>  tests/vbltest/meson.build   | 2 +-
>  22 files changed, 31 insertions(+), 28 deletions(-)
> 
> diff --git a/amdgpu/meson.build b/amdgpu/meson.build
> index d9d7de2d..7c8ccc7e 100644
> --- a/amdgpu/meson.build
> +++ b/amdgpu/meson.build
> @@ -31,7 +31,7 @@ libdrm_amdgpu = shared_library(
>      config_file,
>    ],
>    c_args : [
> -    warn_c_args,
> +    libdrm_c_args,
>      '-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(join_paths(datadir_amdgpu, 'amdgpu.ids')),
>    ],
>    include_directories : [inc_root, inc_drm],
> diff --git a/etnaviv/meson.build b/etnaviv/meson.build
> index ca2aa544..515a4ed0 100644
> --- a/etnaviv/meson.build
> +++ b/etnaviv/meson.build
> @@ -30,7 +30,7 @@ libdrm_etnaviv = shared_library(
>    ],
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops],
>    version : '1.0.0',
>    install : true,
> diff --git a/exynos/meson.build b/exynos/meson.build
> index 30d36405..bdfc3fc6 100644
> --- a/exynos/meson.build
> +++ b/exynos/meson.build
> @@ -21,7 +21,7 @@
>  libdrm_exynos = shared_library(
>    'drm_exynos',
>    [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],
>    link_with : libdrm,
>    dependencies : [dep_pthread_stubs],
> diff --git a/freedreno/meson.build b/freedreno/meson.build
> index 015b7fb1..c9aba060 100644
> --- a/freedreno/meson.build
> +++ b/freedreno/meson.build
> @@ -42,7 +42,7 @@ endif
>  libdrm_freedreno = shared_library(
>    'drm_freedreno',
>    [files_freedreno, config_file],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_drm],
>    dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops],
>    link_with : libdrm,
> diff --git a/intel/meson.build b/intel/meson.build
> index ff40ab91..3d6bbac6 100644
> --- a/intel/meson.build
> +++ b/intel/meson.build
> @@ -30,7 +30,7 @@ libdrm_intel = shared_library(
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
>    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',
>    install : true,
>  )
> @@ -59,7 +59,7 @@ test_decode = executable(
>    files('test_decode.c'),
>    include_directories : [inc_root, inc_drm],
>    link_with : [libdrm, libdrm_intel],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  test(
> diff --git a/libkms/meson.build b/libkms/meson.build
> index 86d1a4ee..dc931608 100644
> --- a/libkms/meson.build
> +++ b/libkms/meson.build
> @@ -44,7 +44,7 @@ endif
>  libkms = shared_library(
>    'kms',
>    [files_libkms, config_file],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : libkms_include,
>    link_with : libdrm,
>    version : '1.0.0',
> diff --git a/meson.build b/meson.build
> index 75c7bdff..80d50188 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -211,6 +211,9 @@ foreach a : ['unused-parameter', 'attributes', 'long-long',
>    endif
>  endforeach
>  
> +# all c args:
> +libdrm_c_args = warn_c_args + ['-fvisibility=hidden']
> +
>  
>  dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
>  dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
> @@ -286,7 +289,7 @@ libdrm = shared_library(
>     ),
>     config_file,
>    ],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    dependencies : [dep_valgrind, dep_rt, dep_m],
>    include_directories : inc_drm,
>    version : '2.4.0',
> diff --git a/nouveau/meson.build b/nouveau/meson.build
> index 51c9a712..0c1498d7 100644
> --- a/nouveau/meson.build
> +++ b/nouveau/meson.build
> @@ -22,7 +22,7 @@
>  libdrm_nouveau = shared_library(
>    'drm_nouveau',
>    [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],
>    link_with : libdrm,
>    dependencies : [dep_threads, dep_atomic_ops],
> diff --git a/omap/meson.build b/omap/meson.build
> index e57b8f5d..54698c6a 100644
> --- a/omap/meson.build
> +++ b/omap/meson.build
> @@ -22,7 +22,7 @@ libdrm_omap = shared_library(
>    'drm_omap',
>    [files('omap_drm.c'), config_file],
>    include_directories : [inc_root, inc_drm],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    link_with : libdrm,
>    dependencies : [dep_pthread_stubs, dep_atomic_ops],
>    version : '1.0.0',
> diff --git a/radeon/meson.build b/radeon/meson.build
> index b08c7442..1fc5282c 100644
> --- a/radeon/meson.build
> +++ b/radeon/meson.build
> @@ -28,7 +28,7 @@ libdrm_radeon = shared_library(
>      ),
>      config_file,
>    ],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
>    dependencies : [dep_pthread_stubs, dep_atomic_ops],
> diff --git a/tegra/meson.build b/tegra/meson.build
> index 1f5c74b3..4bc454b6 100644
> --- a/tegra/meson.build
> +++ b/tegra/meson.build
> @@ -24,7 +24,7 @@ libdrm_tegra = shared_library(
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
>    dependencies : [dep_pthread_stubs, dep_atomic_ops],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    version : '0.0.0',
>    install : true,
>  )
> diff --git a/tests/exynos/meson.build b/tests/exynos/meson.build
> index 940c3ce4..3a048e8a 100644
> --- a/tests/exynos/meson.build
> +++ b/tests/exynos/meson.build
> @@ -24,7 +24,7 @@ if with_libkms
>    exynos_fimg2d_test = executable(
>      'exynos_fimg2d_test',
>      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('../../libkms')],
>      link_with : [libdrm, libkms, libdrm_exynos],
> @@ -36,7 +36,7 @@ endif
>  exynos_fimg2d_perf = executable(
>    'exynos_fimg2d_perf',
>    files('exynos_fimg2d_perf.c'),
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_drm, inc_exynos],
>    link_with : [libdrm, libdrm_exynos],
>    dependencies : dep_threads,
> @@ -46,7 +46,7 @@ exynos_fimg2d_perf = executable(
>  exynos_fimg2d_event = executable(
>    'exynos_fimg2d_event',
>    files('exynos_fimg2d_event.c'),
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_drm, inc_exynos],
>    link_with : [libdrm, libdrm_exynos],
>    dependencies : dep_threads,
> diff --git a/tests/kms/meson.build b/tests/kms/meson.build
> index 1f7f724d..91371aa0 100644
> --- a/tests/kms/meson.build
> +++ b/tests/kms/meson.build
> @@ -27,7 +27,7 @@ libkms_test = static_library(
>    ),
>    include_directories : [inc_root, inc_tests, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  kms_steal_crtc = executable(
> diff --git a/tests/kmstest/meson.build b/tests/kmstest/meson.build
> index a47d4951..4fb870f9 100644
> --- a/tests/kmstest/meson.build
> +++ b/tests/kmstest/meson.build
> @@ -21,7 +21,7 @@
>  kmstest = executable(
>    'kmstest',
>    files('main.c'),
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [
>      inc_root, inc_tests, include_directories('../../libkms'), inc_drm,
>    ],
> diff --git a/tests/meson.build b/tests/meson.build
> index fdf950b7..6c8ddd9c 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -53,7 +53,7 @@ drmsl = executable(
>    files('drmsl.c'),
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  hash = executable(
> @@ -61,7 +61,7 @@ hash = executable(
>    files('hash.c'),
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  random = executable(
> @@ -69,7 +69,7 @@ random = executable(
>    files('random.c'),
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  drmdevice = executable(
> @@ -77,7 +77,7 @@ drmdevice = executable(
>    files('drmdevice.c'),
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  test('random', random, timeout : 240)
> diff --git a/tests/modeprint/meson.build b/tests/modeprint/meson.build
> index 5f0eb24b..898fd181 100644
> --- a/tests/modeprint/meson.build
> +++ b/tests/modeprint/meson.build
> @@ -21,7 +21,7 @@
>  modeprint = executable(
>    'modeprint',
>    files('modeprint.c'),
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_tests, inc_drm],
>    link_with : libdrm,
>    dependencies : dep_threads,
> diff --git a/tests/modetest/meson.build b/tests/modetest/meson.build
> index 2a081845..23d84a1d 100644
> --- a/tests/modetest/meson.build
> +++ b/tests/modetest/meson.build
> @@ -21,7 +21,7 @@
>  modetest = executable(
>    'modetest',
>    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],
>    dependencies : [dep_threads, dep_cairo],
>    link_with : [libdrm, libutil],
> diff --git a/tests/nouveau/meson.build b/tests/nouveau/meson.build
> index f5d73c1e..ca4d44f0 100644
> --- a/tests/nouveau/meson.build
> +++ b/tests/nouveau/meson.build
> @@ -24,7 +24,7 @@ threaded = executable(
>    dependencies : [dep_dl, dep_threads],
>    include_directories : [inc_root, inc_drm, include_directories('../../nouveau')],
>    link_with : [libdrm, libdrm_nouveau],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
>  
>  test('threaded', threaded)
> diff --git a/tests/proptest/meson.build b/tests/proptest/meson.build
> index 22d7473e..9c87965a 100644
> --- a/tests/proptest/meson.build
> +++ b/tests/proptest/meson.build
> @@ -21,7 +21,7 @@
>  proptest = executable(
>    'proptest',
>    files('proptest.c'),
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_tests, inc_drm],
>    link_with : [libdrm, libutil],
>    install : with_install_tests,
> diff --git a/tests/radeon/meson.build b/tests/radeon/meson.build
> index 9e4f916e..bb345b73 100644
> --- a/tests/radeon/meson.build
> +++ b/tests/radeon/meson.build
> @@ -23,5 +23,5 @@ radeon_ttm = executable(
>    files('rbo.c', 'radeon_ttm.c'),
>    include_directories : [inc_root, inc_drm],
>    link_with : libdrm,
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>  )
> diff --git a/tests/tegra/meson.build b/tests/tegra/meson.build
> index 9c74ac4a..4f8c54f4 100644
> --- a/tests/tegra/meson.build
> +++ b/tests/tegra/meson.build
> @@ -22,6 +22,6 @@ openclose = executable(
>    'openclose',
>    files('openclose.c'),
>    include_directories : [inc_root, inc_drm, include_directories('../../tegra')],
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    link_with : [libdrm, libdrm_tegra],
>  )
> diff --git a/tests/vbltest/meson.build b/tests/vbltest/meson.build
> index ae52ab88..6339feba 100644
> --- a/tests/vbltest/meson.build
> +++ b/tests/vbltest/meson.build
> @@ -21,7 +21,7 @@
>  vbltest = executable(
>    'vbltest',
>    files('vbltest.c'),
> -  c_args : warn_c_args,
> +  c_args : libdrm_c_args,
>    include_directories : [inc_root, inc_tests, inc_drm],
>    link_with : [libdrm, libutil],
>    install : with_install_tests,
> -- 
> 2.17.1
> 

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180914/770eb90f/attachment-0001.sig>


More information about the dri-devel mailing list