diff options
author | Dylan Baker <[email protected]> | 2020-04-24 13:10:41 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-01 18:59:18 +0000 |
commit | a8e2d79e0228106d11b6ceeb38f4ffb587f0a819 (patch) | |
tree | 18eef778716e07f993f568e54920e2242fd0b717 /src/mesa | |
parent | fc7301865e1eabe06d4225af596e7334c4094fe5 (diff) |
meson: use gnu_symbol_visibility argument
This uses a meson builtin to handle -fvisibility=hidden. This is nice
because we don't need to track which languages are used, if C++ is
suddenly added meson just does the right thing.
Acked-by: Matt Turner <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/meson.build | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/meson.build | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/meson.build | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/meson.build | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/meson.build | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/meson.build | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/meson.build | 2 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/meson.build | 3 | ||||
-rw-r--r-- | src/mesa/meson.build | 18 |
9 files changed, 27 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/common/meson.build b/src/mesa/drivers/dri/common/meson.build index 2021344c638..dc7e1a18cda 100644 --- a/src/mesa/drivers/dri/common/meson.build +++ b/src/mesa/drivers/dri/common/meson.build @@ -24,7 +24,7 @@ libdricommon = static_library( 'dricommon', files('utils.c', 'utils.h', 'dri_util.c', 'dri_util.h'), include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util], - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, idep_xmlconfig_headers], build_by_default : false, ) @@ -33,7 +33,7 @@ libmegadriver_stub = static_library( 'megadriver_stub', 'megadriver_stub.c', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', dependencies : dep_libdrm, build_by_default : false, ) diff --git a/src/mesa/drivers/dri/i915/meson.build b/src/mesa/drivers/dri/i915/meson.build index 1c3f88c01f2..5524c71c9c4 100644 --- a/src/mesa/drivers/dri/i915/meson.build +++ b/src/mesa/drivers/dri/i915/meson.build @@ -88,7 +88,7 @@ libi915 = static_library( 'i915', files_i915, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_dri_common, inc_util], - c_args : [c_vis_args, no_override_init_args], - cpp_args : [cpp_vis_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_libdrm_intel, idep_xmlconfig_headers], ) diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build index 4d6cd07dbc4..39f8e19f7ce 100644 --- a/src/mesa/drivers/dri/i965/meson.build +++ b/src/mesa/drivers/dri/i965/meson.build @@ -138,9 +138,10 @@ foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100', '110'] 'genX_state_upload.c', gen_xml_pack], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_dri_common], c_args : [ - c_vis_args, no_override_init_args, c_sse2_args, + no_override_init_args, c_sse2_args, '-DGEN_VERSIONx10=@0@'.format(v), ], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, idep_nir_headers], ) endforeach @@ -152,8 +153,9 @@ libi965 = static_library( include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_dri_common, ], - c_args : [c_vis_args, no_override_init_args, c_sse2_args], - cpp_args : [cpp_vis_args, c_sse2_args], + c_args : [no_override_init_args, c_sse2_args], + cpp_args : [c_sse2_args], + gnu_symbol_visibility : 'hidden', link_with : [ i965_gen_libs, libintel_dev, libisl, libintel_compiler, libblorp, libintel_perf diff --git a/src/mesa/drivers/dri/nouveau/meson.build b/src/mesa/drivers/dri/nouveau/meson.build index 39c580d159e..d8141bfb433 100644 --- a/src/mesa/drivers/dri/nouveau/meson.build +++ b/src/mesa/drivers/dri/nouveau/meson.build @@ -83,7 +83,6 @@ libnouveau_vieux = static_library( 'nouveau_vieux', files_nouveau_vieux, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_dri_common, inc_util], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_xmlconfig_headers], ) diff --git a/src/mesa/drivers/dri/r200/meson.build b/src/mesa/drivers/dri/r200/meson.build index 9e3bea3afd2..7a6248d246f 100644 --- a/src/mesa/drivers/dri/r200/meson.build +++ b/src/mesa/drivers/dri/r200/meson.build @@ -82,7 +82,7 @@ libr200 = static_library( include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_dri_common, inc_util, include_directories('server'), ], - c_args : [c_vis_args, '-DRADEON_R200'], - cpp_args : [cpp_vis_args], + c_args : ['-DRADEON_R200'], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_libdrm_radeon, idep_xmlconfig_headers], ) diff --git a/src/mesa/drivers/dri/radeon/meson.build b/src/mesa/drivers/dri/radeon/meson.build index 4e6a375728c..d97da71fee5 100644 --- a/src/mesa/drivers/dri/radeon/meson.build +++ b/src/mesa/drivers/dri/radeon/meson.build @@ -78,7 +78,7 @@ libr100 = static_library( include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_dri_common, inc_util, include_directories('server'), ], - c_args : [c_vis_args, '-DRADEON_R100'], - cpp_args : [cpp_vis_args], + c_args : ['-DRADEON_R100'], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_libdrm_radeon, idep_xmlconfig_headers], ) diff --git a/src/mesa/drivers/dri/swrast/meson.build b/src/mesa/drivers/dri/swrast/meson.build index e27606bae6e..8580c0db7f5 100644 --- a/src/mesa/drivers/dri/swrast/meson.build +++ b/src/mesa/drivers/dri/swrast/meson.build @@ -21,7 +21,7 @@ libswrast_dri = static_library( 'swrast_dri', files('swrast.c', 'swrast_priv.h'), - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_dri_common], dependencies : dep_libdrm, ) diff --git a/src/mesa/drivers/osmesa/meson.build b/src/mesa/drivers/osmesa/meson.build index f9ba2c5ade9..6c84182c11b 100644 --- a/src/mesa/drivers/osmesa/meson.build +++ b/src/mesa/drivers/osmesa/meson.build @@ -27,8 +27,7 @@ endif libosmesa = shared_library( osmesa_lib_name, ['osmesa.c', glapitable_h, glapitemp_h], - c_args : c_vis_args, - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : ld_args_gc_sections, include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, diff --git a/src/mesa/meson.build b/src/mesa/meson.build index edacad9a5f2..c0e85cd70a8 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -706,8 +706,9 @@ if with_sse41 libmesa_sse41 = static_library( 'mesa_sse41', files('main/streaming-load-memcpy.c', 'main/sse_minmax.c'), - c_args : [c_vis_args, c_msvc_compat_args, sse41_args], + c_args : [c_msvc_compat_args, sse41_args], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], + gnu_symbol_visibility : 'hidden', ) else libmesa_sse41 = [] @@ -728,8 +729,9 @@ endif libmesa_common = static_library( 'mesa_common', files_libmesa_common, - c_args : [c_vis_args, c_msvc_compat_args, _mesa_windows_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _mesa_windows_args], + c_args : [c_msvc_compat_args, _mesa_windows_args], + cpp_args : [cpp_msvc_compat_args, _mesa_windows_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_libmesa_asm, include_directories('main')], dependencies : idep_nir_headers, build_by_default : false, @@ -738,8 +740,9 @@ libmesa_common = static_library( libmesa_classic = static_library( 'mesa_classic', files_libmesa_classic, - c_args : [c_vis_args, c_msvc_compat_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_msvc_compat_args], + cpp_args : [cpp_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_libmesa_asm, include_directories('main')], link_with : [libmesa_common, libglsl, libmesa_sse41], dependencies : idep_nir_headers, @@ -749,8 +752,9 @@ libmesa_classic = static_library( libmesa_gallium = static_library( 'mesa_gallium', files_libmesa_gallium, - c_args : [c_vis_args, c_msvc_compat_args, _mesa_windows_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _mesa_windows_args], + c_args : [c_msvc_compat_args, _mesa_windows_args], + cpp_args : [cpp_msvc_compat_args, _mesa_windows_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_libmesa_asm, include_directories('main')], link_with : [libmesa_common, libglsl, libmesa_sse41], dependencies : [idep_nir_headers, dep_vdpau], |