From a8e2d79e0228106d11b6ceeb38f4ffb587f0a819 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 24 Apr 2020 13:10:41 -0700 Subject: [PATCH] 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 Reviewed-by: Eric Engestrom Part-of: --- meson.build | 11 ------- src/amd/addrlib/meson.build | 3 +- src/amd/common/meson.build | 3 +- src/amd/compiler/meson.build | 3 +- src/amd/llvm/meson.build | 3 +- src/amd/vulkan/meson.build | 5 ++-- src/broadcom/cle/meson.build | 3 +- src/broadcom/compiler/meson.build | 3 +- src/broadcom/drm-shim/meson.build | 8 +++-- src/broadcom/meson.build | 6 ++-- src/broadcom/qpu/meson.build | 3 +- src/compiler/glsl/glcpp/meson.build | 13 +++++---- src/compiler/glsl/meson.build | 20 ++++++++----- src/compiler/glsl/tests/meson.build | 15 ++++++---- src/compiler/meson.build | 8 +++-- src/compiler/nir/meson.build | 24 ++++++++++----- src/drm-shim/meson.build | 2 +- src/egl/meson.build | 2 +- src/egl/wayland/wayland-drm/meson.build | 2 +- src/etnaviv/drm-shim/meson.build | 2 +- src/etnaviv/drm/meson.build | 4 +-- src/etnaviv/drm/tests/meson.build | 8 ++--- src/freedreno/common/meson.build | 5 ++-- src/freedreno/drm-shim/meson.build | 2 +- src/freedreno/drm/meson.build | 4 +-- src/freedreno/fdl/meson.build | 4 +-- src/freedreno/ir3/meson.build | 4 +-- src/freedreno/perfcntrs/meson.build | 4 +-- src/freedreno/vulkan/meson.build | 3 +- src/gallium/auxiliary/meson.build | 17 ++++++----- src/gallium/auxiliary/pipe-loader/meson.build | 6 ++-- src/gallium/drivers/etnaviv/meson.build | 2 +- src/gallium/drivers/freedreno/meson.build | 7 +++-- src/gallium/drivers/i915/meson.build | 2 +- src/gallium/drivers/iris/meson.build | 8 +++-- src/gallium/drivers/llvmpipe/meson.build | 5 ++-- src/gallium/drivers/nouveau/meson.build | 3 +- src/gallium/drivers/panfrost/meson.build | 3 +- src/gallium/drivers/r300/meson.build | 2 +- src/gallium/drivers/r600/meson.build | 4 +-- src/gallium/drivers/radeonsi/meson.build | 4 +-- src/gallium/drivers/softpipe/meson.build | 3 +- src/gallium/drivers/svga/meson.build | 3 +- src/gallium/drivers/swr/meson.build | 13 +++++++-- src/gallium/drivers/tegra/meson.build | 2 +- src/gallium/drivers/v3d/meson.build | 12 ++++---- src/gallium/drivers/vc4/meson.build | 4 +-- src/gallium/drivers/virgl/meson.build | 2 +- src/gallium/drivers/zink/meson.build | 2 +- src/gallium/frontends/clover/meson.build | 10 ++++--- src/gallium/frontends/dri/meson.build | 3 +- src/gallium/frontends/glx/xlib/meson.build | 2 +- src/gallium/frontends/hgl/meson.build | 3 +- src/gallium/frontends/nine/meson.build | 2 +- src/gallium/frontends/omx/meson.build | 3 +- src/gallium/frontends/va/meson.build | 2 +- src/gallium/frontends/vdpau/meson.build | 2 +- src/gallium/frontends/xa/meson.build | 3 +- src/gallium/frontends/xvmc/meson.build | 2 +- src/gallium/targets/d3dadapter9/meson.build | 4 +-- src/gallium/targets/dri/meson.build | 3 +- src/gallium/targets/graw-gdi/meson.build | 3 +- src/gallium/targets/graw-null/meson.build | 6 ++-- src/gallium/targets/graw-xlib/meson.build | 2 +- .../targets/haiku-softpipe/meson.build | 3 +- src/gallium/targets/libgl-xlib/meson.build | 3 +- src/gallium/targets/omx/meson.build | 3 +- src/gallium/targets/osmesa/meson.build | 3 +- src/gallium/targets/pipe-loader/meson.build | 5 ++-- src/gallium/targets/va/meson.build | 3 +- src/gallium/targets/vdpau/meson.build | 3 +- src/gallium/targets/xa/meson.build | 3 +- src/gallium/targets/xvmc/meson.build | 3 +- src/gallium/winsys/amdgpu/drm/meson.build | 3 +- src/gallium/winsys/freedreno/drm/meson.build | 2 +- src/gallium/winsys/iris/drm/meson.build | 2 +- src/gallium/winsys/kmsro/drm/meson.build | 3 +- src/gallium/winsys/nouveau/drm/meson.build | 2 +- src/gallium/winsys/panfrost/drm/meson.build | 2 +- src/gallium/winsys/radeon/drm/meson.build | 2 +- src/gallium/winsys/svga/drm/meson.build | 3 +- src/gallium/winsys/sw/dri/meson.build | 2 +- src/gallium/winsys/sw/hgl/meson.build | 2 +- src/gallium/winsys/sw/kms-dri/meson.build | 2 +- src/gallium/winsys/sw/null/meson.build | 2 +- src/gallium/winsys/sw/wrapper/meson.build | 2 +- src/gallium/winsys/sw/xlib/meson.build | 2 +- src/gallium/winsys/v3d/drm/meson.build | 2 +- src/gallium/winsys/vc4/drm/meson.build | 3 +- src/gallium/winsys/virgl/common/meson.build | 2 +- src/gallium/winsys/virgl/drm/meson.build | 2 +- src/gallium/winsys/virgl/vtest/meson.build | 2 +- src/gbm/meson.build | 3 +- src/glx/apple/meson.build | 2 +- src/glx/meson.build | 3 +- src/glx/windows/meson.build | 2 +- src/intel/blorp/meson.build | 3 +- src/intel/common/meson.build | 6 ++-- src/intel/compiler/meson.build | 4 +-- src/intel/dev/meson.build | 3 +- src/intel/isl/meson.build | 16 ++++++---- src/intel/perf/meson.build | 5 ++-- src/intel/tools/meson.build | 29 ++++++++++++------- src/intel/vulkan/meson.build | 7 +++-- src/loader/meson.build | 5 ++-- src/mapi/es1api/meson.build | 2 +- src/mapi/es2api/meson.build | 2 +- src/mapi/shared-glapi/meson.build | 2 +- src/mesa/drivers/dri/common/meson.build | 4 +-- src/mesa/drivers/dri/i915/meson.build | 4 +-- src/mesa/drivers/dri/i965/meson.build | 8 +++-- src/mesa/drivers/dri/nouveau/meson.build | 3 +- src/mesa/drivers/dri/r200/meson.build | 4 +-- src/mesa/drivers/dri/radeon/meson.build | 4 +-- src/mesa/drivers/dri/swrast/meson.build | 2 +- src/mesa/drivers/osmesa/meson.build | 3 +- src/mesa/meson.build | 18 +++++++----- src/meson.build | 2 +- src/panfrost/bifrost/meson.build | 4 +-- src/panfrost/encoder/meson.build | 4 +-- src/panfrost/midgard/meson.build | 4 +-- src/panfrost/pandecode/meson.build | 4 +-- src/panfrost/shared/meson.build | 4 +-- src/panfrost/util/meson.build | 4 +-- src/util/format/meson.build | 3 +- src/util/meson.build | 6 ++-- src/vulkan/device-select-layer/meson.build | 3 +- src/vulkan/overlay-layer/meson.build | 5 ++-- src/vulkan/util/meson.build | 3 +- src/vulkan/wsi/meson.build | 3 +- 130 files changed, 339 insertions(+), 256 deletions(-) diff --git a/meson.build b/meson.build index 2365874bc3f..198d0518b99 100644 --- a/meson.build +++ b/meson.build @@ -882,11 +882,9 @@ endif # Check for generic C arguments c_args = [] -c_vis_args = [] c_msvc_compat_args = [] no_override_init_args = [] cpp_args = [] -cpp_vis_args = [] cpp_msvc_compat_args = [] if cc.get_id() == 'msvc' foreach a : ['/wd4018', # signed/unsigned mismatch @@ -970,10 +968,6 @@ else endif endforeach - if cc.has_argument('-fvisibility=hidden') - c_vis_args += '-fvisibility=hidden' - endif - # Check for C and C++ arguments for MSVC compatibility. These are only used # in parts of the mesa code base that need to compile with MSVC, mainly # common code @@ -985,11 +979,6 @@ else cpp_msvc_compat_args += a endif endforeach - - if cpp.has_argument('-fvisibility=hidden') - cpp_vis_args += '-fvisibility=hidden' - endif - endif # set linker arguments diff --git a/src/amd/addrlib/meson.build b/src/amd/addrlib/meson.build index a22b7bc16e6..c20e5a480e7 100644 --- a/src/amd/addrlib/meson.build +++ b/src/amd/addrlib/meson.build @@ -62,5 +62,6 @@ libamdgpu_addrlib = static_library( ), inc_amd_common, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, ], - cpp_args : [cpp_vis_args, '-Wno-unused-variable'], + cpp_args : ['-Wno-unused-variable'], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build index 26029e06b08..739428baec0 100644 --- a/src/amd/common/meson.build +++ b/src/amd/common/meson.build @@ -64,8 +64,7 @@ libamd_common = static_library( dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind, idep_nir_headers, ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', ) idep_amdgfxregs_h = declare_dependency(sources : [amdgfxregs_h]) diff --git a/src/amd/compiler/meson.build b/src/amd/compiler/meson.build index 778cf8ee3ee..dbf077b0fdc 100644 --- a/src/amd/compiler/meson.build +++ b/src/amd/compiler/meson.build @@ -96,8 +96,7 @@ _libaco = static_library( dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind, idep_nir_headers, idep_amdgfxregs_h, ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', build_by_default : true, ) diff --git a/src/amd/llvm/meson.build b/src/amd/llvm/meson.build index 6c68c413d9c..d52709eb671 100644 --- a/src/amd/llvm/meson.build +++ b/src/amd/llvm/meson.build @@ -44,7 +44,6 @@ libamd_common_llvm = static_library( dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind, idep_nir_headers, idep_amdgfxregs_h, ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index efcf2dd6c89..7a0d92e324d 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -171,9 +171,10 @@ libvulkan_radeon = shared_library( dep_valgrind, radv_deps, idep_aco, idep_mesautil, idep_nir, idep_vulkan_util, idep_amdgfxregs_h, idep_xmlconfig, ], - c_args : [c_vis_args, no_override_init_args, radv_flags], - cpp_args : [cpp_vis_args, radv_flags], + c_args : [no_override_init_args, radv_flags], + cpp_args : [radv_flags], link_args : [ld_args_bsymbolic, ld_args_gc_sections], + gnu_symbol_visibility : 'hidden', install : true, ) diff --git a/src/broadcom/cle/meson.build b/src/broadcom/cle/meson.build index 01167672f9f..50031cc7137 100644 --- a/src/broadcom/cle/meson.build +++ b/src/broadcom/cle/meson.build @@ -57,7 +57,8 @@ libbroadcom_cle = static_library( ['broadcom_cle', v3d_xml_h], 'v3d_decoder.c', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_valgrind, dep_expat, dep_zlib], build_by_default : false, ) diff --git a/src/broadcom/compiler/meson.build b/src/broadcom/compiler/meson.build index c3e1994aee5..9094f1ac6d0 100644 --- a/src/broadcom/compiler/meson.build +++ b/src/broadcom/compiler/meson.build @@ -46,7 +46,8 @@ libbroadcom_compiler = static_library( ['broadcom_compiler', v3d_xml_pack], libbroadcom_compiler_files, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers], build_by_default : false, ) diff --git a/src/broadcom/drm-shim/meson.build b/src/broadcom/drm-shim/meson.build index d053d2c5b59..ab474b648ee 100644 --- a/src/broadcom/drm-shim/meson.build +++ b/src/broadcom/drm-shim/meson.build @@ -23,7 +23,7 @@ libv3d_noop_drm_shim = shared_library( 'v3d_noop.c', include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies: dep_drm_shim, - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', install : true, ) @@ -42,7 +42,8 @@ if dep_v3dv3.found() v3d_xml_pack ], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom, inc_gallium_v3d], - c_args : [c_vis_args, no_override_init_args, '-DV3D_VERSION=' + ver, v3dv3_c_args], + c_args : [no_override_init_args, '-DV3D_VERSION=' + ver, v3dv3_c_args], + gnu_symbol_visibility : 'hidden', dependencies: [dep_valgrind, dep_thread, dep_v3dv3], ) endforeach @@ -56,7 +57,8 @@ if dep_v3dv3.found() dependencies: [idep_mesautil, dep_dl, dep_drm_shim, dep_v3dv3], link_with: per_version_libs, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom, inc_gallium_v3d], - c_args : [c_vis_args, no_override_init_args, '-std=gnu99', v3dv3_c_args], + c_args : [no_override_init_args, '-std=gnu99', v3dv3_c_args], + gnu_symbol_visibility : 'hidden', cpp_args : [v3dv3_c_args] ) endif diff --git a/src/broadcom/meson.build b/src/broadcom/meson.build index 3abbc5431d7..15177c5f99c 100644 --- a/src/broadcom/meson.build +++ b/src/broadcom/meson.build @@ -43,7 +43,8 @@ foreach ver : v3d_versions v3d_xml_pack ], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom], - c_args : [c_vis_args, no_override_init_args, '-DV3D_VERSION=' + ver], + c_args : [no_override_init_args, '-DV3D_VERSION=' + ver], + gnu_symbol_visibility : 'hidden', dependencies: [dep_valgrind, dep_thread], ) endforeach @@ -55,7 +56,8 @@ libbroadcom_v3d = static_library( v3d_xml_pack, ], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', link_whole : v3d_libs + per_version_libs, build_by_default : false, dependencies: [dep_valgrind, dep_thread], diff --git a/src/broadcom/qpu/meson.build b/src/broadcom/qpu/meson.build index 08162037a32..eea1f9bb058 100644 --- a/src/broadcom/qpu/meson.build +++ b/src/broadcom/qpu/meson.build @@ -28,7 +28,8 @@ libbroadcom_qpu = static_library( ['broadcom_qpu', v3d_xml_pack], libbroadcom_qpu_files, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_valgrind], build_by_default : false, ) diff --git a/src/compiler/glsl/glcpp/meson.build b/src/compiler/glsl/glcpp/meson.build index c87f0b6c0be..bc4eda26a76 100644 --- a/src/compiler/glsl/glcpp/meson.build +++ b/src/compiler/glsl/glcpp/meson.build @@ -50,8 +50,9 @@ libglcpp = static_library( [glcpp_lex, glcpp_parse, files('glcpp.h', 'pp.c')], dependencies : idep_mesautil, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args, _extra_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _extra_args], + c_args : [no_override_init_args, c_msvc_compat_args, _extra_args], + cpp_args : [cpp_msvc_compat_args, _extra_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) @@ -60,8 +61,9 @@ libglcpp_standalone = static_library( 'pp_standalone_scaffolding.c', link_with : libglcpp, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args, _extra_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _extra_args], + c_args : [no_override_init_args, c_msvc_compat_args, _extra_args], + cpp_args : [cpp_msvc_compat_args, _extra_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) @@ -71,7 +73,8 @@ glcpp = executable( dependencies : [dep_m, idep_getopt], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], link_with : [libglcpp_standalone, libglsl_util], - c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args], + c_args : [no_override_init_args, c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build index 6ab34f3014b..e59630590b9 100644 --- a/src/compiler/glsl/meson.build +++ b/src/compiler/glsl/meson.build @@ -227,8 +227,9 @@ libglsl = static_library( [files_libglsl, glsl_parser, glsl_lexer_cpp, ir_expression_operation_h, ir_expression_operation_strings_h, ir_expression_operation_constant_h, float64_glsl_h], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_msvc_compat_args, no_override_init_args], + cpp_args : [cpp_msvc_compat_args], + gnu_symbol_visibility : 'hidden', link_with : libglcpp, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_compiler], dependencies : idep_nir, @@ -238,8 +239,9 @@ libglsl = static_library( libglsl_standalone = static_library( 'glsl_standalone', [files_libglsl_standalone, ir_expression_operation_h], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_msvc_compat_args, no_override_init_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], link_with : [libglsl, libglsl_util, libglcpp_standalone], dependencies : [idep_mesautil, idep_getopt], @@ -249,8 +251,9 @@ libglsl_standalone = static_library( glsl_compiler = executable( 'glsl_compiler', 'main.cpp', - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_msvc_compat_args, no_override_init_args], + cpp_args : [cpp_msvc_compat_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_clock, dep_thread, idep_getopt], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], link_with : [libglsl_standalone], @@ -262,8 +265,9 @@ glsl_test = executable( 'glsl_test', ['test.cpp', 'test_optpass.cpp', 'test_optpass.h', ir_expression_operation_h], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_msvc_compat_args, no_override_init_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], dependencies : [dep_clock, dep_thread, idep_getopt], link_with : [libglsl, libglsl_standalone, libglsl_util], diff --git a/src/compiler/glsl/tests/meson.build b/src/compiler/glsl/tests/meson.build index c887a5a7e4c..db89b48ec63 100644 --- a/src/compiler/glsl/tests/meson.build +++ b/src/compiler/glsl/tests/meson.build @@ -24,7 +24,8 @@ if with_shader_cache executable( 'cache_test', 'cache_test.c', - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + c_args : [c_msvc_compat_args, no_override_init_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl], link_with : [libglsl], dependencies : [dep_clock, dep_thread], @@ -41,7 +42,8 @@ test( 'invalidate_locations_test.cpp', 'general_ir_test.cpp', 'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp', 'varyings_test.cpp', ir_expression_operation_h], - cpp_args : [cpp_vis_args, cpp_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_glsl], link_with : [libglsl, libglsl_standalone, libglsl_util], dependencies : [dep_clock, dep_thread, idep_gtest], @@ -56,7 +58,8 @@ test( ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp', 'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h', ir_expression_operation_h], - cpp_args : [cpp_vis_args, cpp_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_glsl], link_with : [libglsl, libglsl_util], dependencies : [dep_thread, idep_gtest], @@ -69,7 +72,8 @@ test( executable( 'sampler_types_test', ['sampler_types_test.cpp', ir_expression_operation_h], - cpp_args : [cpp_vis_args, cpp_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_glsl], link_with : [libglsl, libglsl_util], dependencies : [dep_thread, idep_gtest], @@ -82,7 +86,8 @@ test( executable( 'list_iterators', ['list_iterators.cpp'], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + cpp_args : [cpp_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_glsl], link_with : [libglsl, libglsl_util], dependencies : [dep_thread, idep_gtest], diff --git a/src/compiler/meson.build b/src/compiler/meson.build index e068a30a6bd..c3bf5536521 100644 --- a/src/compiler/meson.build +++ b/src/compiler/meson.build @@ -45,8 +45,9 @@ libcompiler = static_library( 'compiler', [files_libcompiler, ir_expression_operation_h], include_directories : [inc_mapi, inc_mesa, inc_compiler, inc_include, inc_src, inc_gallium, inc_gallium_aux], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_msvc_compat_args, no_override_init_args], + cpp_args : [cpp_msvc_compat_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_valgrind], build_by_default : false, ) @@ -62,7 +63,8 @@ spirv2nir = executable( files('spirv/spirv2nir.c'), dependencies : [dep_m, idep_nir, idep_mesautil], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, include_directories('spirv')], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + c_args : [c_msvc_compat_args, no_override_init_args], + gnu_symbol_visibility : 'hidden', build_by_default : with_tools.contains('nir'), install : with_tools.contains('nir'), ) diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index 15d73b5aede..20260d0d5e6 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -258,7 +258,8 @@ _libnir = static_library( nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h, vtn_gather_types_c, nir_intrinsics_c, nir_intrinsics_h], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_compiler, include_directories('../spirv')], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + c_args : [c_msvc_compat_args, no_override_init_args], + gnu_symbol_visibility : 'hidden', link_with : libcompiler, build_by_default : false, ) @@ -283,7 +284,8 @@ if with_tests executable( 'nir_builder_test', files('tests/builder_tests.cpp'), - cpp_args : [cpp_vis_args, cpp_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], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), @@ -295,7 +297,8 @@ if with_tests executable( 'nir_control_flow_test', files('tests/control_flow_tests.cpp'), - cpp_args : [cpp_vis_args, cpp_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], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), @@ -307,7 +310,8 @@ if with_tests executable( 'nir_vars_test', files('tests/vars_tests.cpp'), - cpp_args : [cpp_vis_args, cpp_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], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), @@ -328,7 +332,8 @@ if with_tests executable( 'negative_equal', files('tests/negative_equal_tests.cpp'), - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + c_args : [c_msvc_compat_args, no_override_init_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), @@ -340,7 +345,8 @@ if with_tests executable( 'comparison_pre', files('tests/comparison_pre_tests.cpp'), - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + c_args : [c_msvc_compat_args, no_override_init_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), @@ -352,7 +358,8 @@ if with_tests executable( 'load_store_vectorizer', files('tests/load_store_vectorizer_tests.cpp'), - cpp_args : [cpp_vis_args, cpp_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], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), @@ -365,7 +372,8 @@ if with_tests executable( 'nir_serialize_test', files('tests/serialize_tests.cpp'), - cpp_args : [cpp_vis_args, cpp_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], dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil], ), diff --git a/src/drm-shim/meson.build b/src/drm-shim/meson.build index b1f238c27ec..2a7ea000a61 100644 --- a/src/drm-shim/meson.build +++ b/src/drm-shim/meson.build @@ -27,7 +27,7 @@ drm_shim = static_library( ], include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies: [dep_libdrm, idep_mesautil, dep_dl], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', override_options : ['c_std=gnu99'], ) dep_drm_shim = declare_dependency( diff --git a/src/egl/meson.build b/src/egl/meson.build index 12d74ec37fa..7996a4ac2fa 100644 --- a/src/egl/meson.build +++ b/src/egl/meson.build @@ -162,10 +162,10 @@ libegl = shared_library( egl_lib_name, files_egl, c_args : [ - c_vis_args, c_args_for_egl, '-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_@0@'.format(egl_native_platform.to_upper()), ], + gnu_symbol_visibility : 'hidden', include_directories : incs_for_egl, link_with : [link_for_egl, libglapi], link_args : [ld_args_bsymbolic, ld_args_gc_sections], diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build index 983bf55fac8..b4782a013c9 100644 --- a/src/egl/wayland/wayland-drm/meson.build +++ b/src/egl/wayland/wayland-drm/meson.build @@ -44,7 +44,7 @@ wayland_drm_server_protocol_h = custom_target( libwayland_drm = static_library( 'wayland_drm', ['wayland-drm.c', wayland_drm_protocol_c, wayland_drm_server_protocol_h], - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', dependencies : [dep_wayland_server], build_by_default : false, ) diff --git a/src/etnaviv/drm-shim/meson.build b/src/etnaviv/drm-shim/meson.build index 941da099a7c..bb734c93093 100644 --- a/src/etnaviv/drm-shim/meson.build +++ b/src/etnaviv/drm-shim/meson.build @@ -25,6 +25,6 @@ libetnaviv_noop_drm_shim = shared_library( 'etnaviv_noop.c', include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies: dep_drm_shim, - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', install : true, ) diff --git a/src/etnaviv/drm/meson.build b/src/etnaviv/drm/meson.build index 20e6ee7dd87..c5f6e09c66a 100644 --- a/src/etnaviv/drm/meson.build +++ b/src/etnaviv/drm/meson.build @@ -42,8 +42,8 @@ libetnaviv_drm = static_library( inc_gallium, inc_gallium_aux, ], - 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_valgrind, diff --git a/src/etnaviv/drm/tests/meson.build b/src/etnaviv/drm/tests/meson.build index 241e3e4022c..c5a3c778938 100644 --- a/src/etnaviv/drm/tests/meson.build +++ b/src/etnaviv/drm/tests/meson.build @@ -30,8 +30,8 @@ etnaviv_cmd_stream_test = executable( inc_gallium, inc_gallium_aux, ], - 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_valgrind, @@ -53,8 +53,8 @@ etnaviv_bo_cache_test = executable( inc_gallium, inc_gallium_aux, ], - 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_valgrind, diff --git a/src/freedreno/common/meson.build b/src/freedreno/common/meson.build index 409fc917798..40bf1511e02 100644 --- a/src/freedreno/common/meson.build +++ b/src/freedreno/common/meson.build @@ -25,9 +25,10 @@ libfreedreno_common = static_library( 'freedreno_uuid.h', ], include_directories : [inc_freedreno, inc_include, inc_src, inc_gallium], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], build_by_default : true, - dependencies: [idep_mesautil] + dependencies: [idep_mesautil], + gnu_symbol_visibility : 'hidden', ) idep_libfreedreno_common = declare_dependency( diff --git a/src/freedreno/drm-shim/meson.build b/src/freedreno/drm-shim/meson.build index 6e7166bc096..c5fbbc6d53c 100644 --- a/src/freedreno/drm-shim/meson.build +++ b/src/freedreno/drm-shim/meson.build @@ -24,6 +24,6 @@ libfreedreno_noop_drm_shim = shared_library( 'freedreno_noop.c', include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies: dep_drm_shim, - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', install : true, ) diff --git a/src/freedreno/drm/meson.build b/src/freedreno/drm/meson.build index b29ea9d71f6..3cee9d424f6 100644 --- a/src/freedreno/drm/meson.build +++ b/src/freedreno/drm/meson.build @@ -50,8 +50,8 @@ libfreedreno_drm = static_library( inc_gallium, inc_gallium_aux, ], - 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_valgrind, diff --git a/src/freedreno/fdl/meson.build b/src/freedreno/fdl/meson.build index 15eff5b2477..7f7cdd87eb9 100644 --- a/src/freedreno/fdl/meson.build +++ b/src/freedreno/fdl/meson.build @@ -26,8 +26,8 @@ libfreedreno_layout = static_library( 'freedreno_layout.c', ], include_directories : [inc_freedreno, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - 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 : idep_nir_headers, build_by_default : false, ) diff --git a/src/freedreno/ir3/meson.build b/src/freedreno/ir3/meson.build index de56888c22d..c5be77f6e4f 100644 --- a/src/freedreno/ir3/meson.build +++ b/src/freedreno/ir3/meson.build @@ -105,8 +105,8 @@ libfreedreno_ir3 = static_library( 'freedreno_ir3', [libfreedreno_ir3_files, ir3_nir_trig_c, ir3_nir_imul_c, ir3_parser[0], ir3_parser[1], ir3_lexer], include_directories : [inc_freedreno, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - 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 : idep_nir_headers, build_by_default : false, ) diff --git a/src/freedreno/perfcntrs/meson.build b/src/freedreno/perfcntrs/meson.build index 66ab1de44ad..48370a32b7d 100644 --- a/src/freedreno/perfcntrs/meson.build +++ b/src/freedreno/perfcntrs/meson.build @@ -30,8 +30,8 @@ libfreedreno_perfcntrs = static_library( 'freedreno_perfcntrs', [libfreedreno_perfcntrs_files, freedreno_xml_header_files], include_directories : [inc_freedreno, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - 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 : idep_nir_headers, build_by_default : false, ) diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build index bafce3d06d7..a4ec242e553 100644 --- a/src/freedreno/vulkan/meson.build +++ b/src/freedreno/vulkan/meson.build @@ -130,7 +130,8 @@ libvulkan_freedreno = shared_library( idep_vulkan_util, idep_mesautil, ], - c_args : [c_vis_args, no_override_init_args, tu_flags], + c_args : [no_override_init_args, tu_flags], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_bsymbolic, ld_args_gc_sections], install : true, ) diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build index 8b02084c0d0..3e91a6c2723 100644 --- a/src/gallium/auxiliary/meson.build +++ b/src/gallium/auxiliary/meson.build @@ -488,7 +488,7 @@ if with_dri2 and with_platform_x11 if with_dri3 vlwinsys_deps += [ dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes, - dep_xcb_dri3, + dep_xcb_dri3, ] files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c') endif @@ -516,8 +516,9 @@ libgallium = static_library( include_directories : [ inc_loader, inc_gallium, inc_src, inc_include, include_directories('util') ], - 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', dependencies : [ dep_libdrm, dep_llvm, dep_unwind, dep_dl, dep_m, dep_thread, dep_lmsensors, idep_nir, idep_nir_headers, idep_mesautil, @@ -528,8 +529,9 @@ libgallium = static_library( libgalliumvl_stub = static_library( 'galliumvl_stub', 'vl/vl_stubs.c', - 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_gallium, inc_include, inc_src], build_by_default : false, ) @@ -537,8 +539,9 @@ libgalliumvl_stub = static_library( libgalliumvl = static_library( 'galliumvl', files_libgalliumvl, - 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_gallium, inc_include, inc_src], build_by_default : false, ) diff --git a/src/gallium/auxiliary/pipe-loader/meson.build b/src/gallium/auxiliary/pipe-loader/meson.build index 4c6ae60ff4e..32d592f756d 100644 --- a/src/gallium/auxiliary/pipe-loader/meson.build +++ b/src/gallium/auxiliary/pipe-loader/meson.build @@ -50,7 +50,8 @@ libpipe_loader_static = static_library( inc_util, inc_loader, inc_gallium, inc_include, inc_src, inc_gallium_aux, inc_gallium_winsys, ], - c_args : [c_vis_args, libpipe_loader_defines, '-DGALLIUM_STATIC_TARGETS=1'], + c_args : [libpipe_loader_defines, '-DGALLIUM_STATIC_TARGETS=1'], + gnu_symbol_visibility : 'hidden', link_with : libloader, dependencies : [dep_libdrm, idep_xmlconfig], build_by_default : false, @@ -64,11 +65,12 @@ libpipe_loader_dynamic = static_library( inc_gallium_winsys, ], c_args : [ - c_vis_args, libpipe_loader_defines, + libpipe_loader_defines, '-DPIPE_SEARCH_DIR="@0@"'.format( join_paths(get_option('prefix'), get_option('libdir'), 'gallium-pipe') ) ], + gnu_symbol_visibility : 'hidden', link_with : [libpipe_loader_links], dependencies : [dep_libdrm, idep_xmlconfig], build_by_default : false, diff --git a/src/gallium/drivers/etnaviv/meson.build b/src/gallium/drivers/etnaviv/meson.build index 102797807be..e4adbf30b52 100644 --- a/src/gallium/drivers/etnaviv/meson.build +++ b/src/gallium/drivers/etnaviv/meson.build @@ -98,7 +98,7 @@ files_etnaviv = files( libetnaviv = static_library( 'etnaviv', files_etnaviv, - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_etnaviv, ], diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build index 8284f5e1a6d..bb1ffa67cb0 100644 --- a/src/gallium/drivers/freedreno/meson.build +++ b/src/gallium/drivers/freedreno/meson.build @@ -226,7 +226,7 @@ freedreno_includes = [ inc_freedreno, include_directories('ir3'), ] -freedreno_c_args = [ c_vis_args, no_override_init_args ] +freedreno_c_args = [no_override_init_args] if cc.has_argument('-Wpacked-bitfield-compat') freedreno_c_args += '-Wno-packed-bitfield-compat' endif @@ -240,8 +240,9 @@ libfreedreno = static_library( 'freedreno', [files_libfreedreno, freedreno_xml_header_files], include_directories : freedreno_includes, - c_args : [freedreno_c_args, c_vis_args], - cpp_args : [freedreno_cpp_args, cpp_vis_args], + c_args : [freedreno_c_args], + cpp_args : [freedreno_cpp_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, idep_nir_headers], ) diff --git a/src/gallium/drivers/i915/meson.build b/src/gallium/drivers/i915/meson.build index 77f44a979dc..5bb97ede214 100644 --- a/src/gallium/drivers/i915/meson.build +++ b/src/gallium/drivers/i915/meson.build @@ -65,7 +65,7 @@ files_i915 = files( libi915 = static_library( 'i915', files_i915, - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux], ) diff --git a/src/gallium/drivers/iris/meson.build b/src/gallium/drivers/iris/meson.build index 34b43245f34..a6712d2fe64 100644 --- a/src/gallium/drivers/iris/meson.build +++ b/src/gallium/drivers/iris/meson.build @@ -73,9 +73,10 @@ foreach v : ['80', '90', '100', '110', '120'] ['iris_blorp.c', 'iris_query.c', 'iris_state.c', gen_xml_pack], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_intel], 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, dep_valgrind, idep_nir_headers], ) endforeach @@ -89,8 +90,9 @@ libiris = static_library( # these should not be necessary, but main/macros.h... inc_mesa, inc_mapi ], - c_args : [c_vis_args, c_sse2_args], - cpp_args : [cpp_vis_args, c_sse2_args], + c_args : [c_sse2_args], + cpp_args : [c_sse2_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_valgrind, idep_genxml, idep_libintel_common, idep_nir_headers], link_with : [ iris_gen_libs, libintel_compiler, libintel_dev, libisl, diff --git a/src/gallium/drivers/llvmpipe/meson.build b/src/gallium/drivers/llvmpipe/meson.build index 138c2ce871b..7a4766ca4d3 100644 --- a/src/gallium/drivers/llvmpipe/meson.build +++ b/src/gallium/drivers/llvmpipe/meson.build @@ -99,8 +99,9 @@ files_llvmpipe = files( libllvmpipe = static_library( 'llvmpipe', files_llvmpipe, - 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_gallium, inc_gallium_aux, inc_include, inc_src], dependencies : [ dep_llvm, idep_nir_headers, ], ) diff --git a/src/gallium/drivers/nouveau/meson.build b/src/gallium/drivers/nouveau/meson.build index 7a1d18a6394..c6caae2bb79 100644 --- a/src/gallium/drivers/nouveau/meson.build +++ b/src/gallium/drivers/nouveau/meson.build @@ -214,8 +214,7 @@ libnouveau = static_library( include_directories : [ inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa, ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_nir_headers], ) diff --git a/src/gallium/drivers/panfrost/meson.build b/src/gallium/drivers/panfrost/meson.build index 06bcf681278..b3ebb16fe2d 100644 --- a/src/gallium/drivers/panfrost/meson.build +++ b/src/gallium/drivers/panfrost/meson.build @@ -68,7 +68,8 @@ libpanfrost = static_library( idep_nir ], include_directories : panfrost_includes, - c_args : [c_vis_args, c_msvc_compat_args, compile_args_panfrost], + c_args : [c_msvc_compat_args, compile_args_panfrost], + gnu_symbol_visibility : 'hidden', ) driver_panfrost = declare_dependency( diff --git a/src/gallium/drivers/r300/meson.build b/src/gallium/drivers/r300/meson.build index 66569bab364..ee8572444ea 100644 --- a/src/gallium/drivers/r300/meson.build +++ b/src/gallium/drivers/r300/meson.build @@ -121,11 +121,11 @@ files_r300 = files( libr300 = static_library( 'r300', files_r300, - c_args : [c_vis_args], include_directories : [ inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_mesa, ], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm_radeon, dep_llvm], ) diff --git a/src/gallium/drivers/r600/meson.build b/src/gallium/drivers/r600/meson.build index 0bb31dca20a..880dad590cb 100644 --- a/src/gallium/drivers/r600/meson.build +++ b/src/gallium/drivers/r600/meson.build @@ -195,8 +195,8 @@ endif libr600 = static_library( 'r600', [files_r600, egd_tables_h], - c_args : [c_vis_args, r600_c_args, '-Wstrict-overflow=0'], - cpp_args : [cpp_vis_args], + c_args : [r600_c_args, '-Wstrict-overflow=0'], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_src, inc_mapi, inc_mesa, inc_include, inc_compiler, inc_gallium, inc_gallium_aux, inc_amd_common, inc_gallium_drivers, diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build index 357869eb94c..4f6ea1315c8 100644 --- a/src/gallium/drivers/radeonsi/meson.build +++ b/src/gallium/drivers/radeonsi/meson.build @@ -122,8 +122,8 @@ libradeonsi = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common, inc_amd_common_llvm, inc_gallium_drivers, ], - c_args : ['-Wstrict-overflow=0', c_vis_args], - cpp_args : [cpp_vis_args], + c_args : ['-Wstrict-overflow=0'], + gnu_symbol_visibility : 'hidden', dependencies : [dep_llvm, dep_clock, dep_libdrm_radeon, idep_nir_headers, idep_amdgfxregs_h], ) diff --git a/src/gallium/drivers/softpipe/meson.build b/src/gallium/drivers/softpipe/meson.build index a345ff62ec9..6af71289763 100644 --- a/src/gallium/drivers/softpipe/meson.build +++ b/src/gallium/drivers/softpipe/meson.build @@ -80,7 +80,8 @@ libsoftpipe = static_library( 'softpipe', files_softpipe, include_directories : [inc_gallium_aux, inc_gallium, inc_include, inc_src], - c_args : [c_vis_args, c_msvc_compat_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', ) driver_swrast = declare_dependency( diff --git a/src/gallium/drivers/svga/meson.build b/src/gallium/drivers/svga/meson.build index 4d3207a9942..368d0c7f342 100644 --- a/src/gallium/drivers/svga/meson.build +++ b/src/gallium/drivers/svga/meson.build @@ -79,7 +79,8 @@ files_svga = files( libsvga = static_library( 'svga', [files_svga, sha1_h], - c_args : [c_vis_args, c_msvc_compat_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_src, inc_include, inc_gallium, inc_gallium_aux, include_directories('include') diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build index e68d962ed84..f8c4ba93f55 100644 --- a/src/gallium/drivers/swr/meson.build +++ b/src/gallium/drivers/swr/meson.build @@ -187,7 +187,7 @@ swr_incs = include_directories( 'rasterizer/archrast', 'rasterizer', ) -swr_cpp_args = [cpp_vis_args] +swr_cpp_args = [] if cpp.has_argument('-fno-strict-aliasing') swr_cpp_args += '-fno-strict-aliasing' endif @@ -232,6 +232,7 @@ if with_swr_arches.contains('skx') cpp_msvc_compat_args, swr_cpp_args, swr_skx_args, '-DKNOB_ARCH=KNOB_ARCH_AVX512', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -247,6 +248,7 @@ if with_swr_arches.contains('skx') cpp_msvc_compat_args, swr_cpp_args, swr_skx_args, '-DKNOB_ARCH=KNOB_ARCH_AVX512', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -271,6 +273,7 @@ if with_swr_arches.contains('knl') cpp_msvc_compat_args, swr_cpp_args, swr_knl_args, '-DKNOB_ARCH=KNOB_ARCH_AVX512', '-DSIMD_ARCH_KNIGHTS', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -286,6 +289,7 @@ if with_swr_arches.contains('knl') cpp_msvc_compat_args, swr_cpp_args, swr_knl_args, '-DKNOB_ARCH=KNOB_ARCH_AVX512', '-DSIMD_ARCH_KNIGHTS', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -315,6 +319,7 @@ if with_swr_arches.contains('avx2') cpp_msvc_compat_args, swr_cpp_args, swr_avx2_args, '-DKNOB_ARCH=KNOB_ARCH_AVX2', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -330,6 +335,7 @@ if with_swr_arches.contains('avx2') cpp_msvc_compat_args, swr_cpp_args, swr_avx2_args, '-DKNOB_ARCH=KNOB_ARCH_AVX2', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -347,6 +353,7 @@ if with_swr_arches.contains('avx') cpp_msvc_compat_args, swr_cpp_args, swr_avx_args, '-DKNOB_ARCH=KNOB_ARCH_AVX', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -362,6 +369,7 @@ if with_swr_arches.contains('avx') cpp_msvc_compat_args, swr_cpp_args, swr_avx_args, '-DKNOB_ARCH=KNOB_ARCH_AVX', ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [swr_incs], dependencies : [dep_thread, dep_llvm], @@ -380,9 +388,10 @@ libmesaswr = static_library( [files_swr_mesa, files_swr_common, gen_knobs_h, gen_knobs_cpp, gen_builder_hpp, gen_builder_meta_hpp, gen_builder_intrin_hpp], cpp_args : [ - cpp_msvc_compat_args, cpp_vis_args, swr_cpp_args, swr_avx_args, + cpp_msvc_compat_args, swr_cpp_args, swr_avx_args, swr_defines, ], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, swr_incs], dependencies : dep_llvm, ) diff --git a/src/gallium/drivers/tegra/meson.build b/src/gallium/drivers/tegra/meson.build index 939d6294601..e428cea32de 100644 --- a/src/gallium/drivers/tegra/meson.build +++ b/src/gallium/drivers/tegra/meson.build @@ -28,7 +28,7 @@ files_tegra = files( libtegra = static_library( 'tegra', files_tegra, - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_gallium_winsys, diff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build index 78f38685826..64e6cb0789a 100644 --- a/src/gallium/drivers/v3d/meson.build +++ b/src/gallium/drivers/v3d/meson.build @@ -78,8 +78,8 @@ foreach ver : v3d_versions inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom, inc_gallium_drivers, ], - c_args : [c_vis_args, v3d_args, '-DV3D_VERSION=' + ver], - cpp_args : [cpp_vis_args], + c_args : [v3d_args, '-DV3D_VERSION=' + ver], + gnu_symbol_visibility : 'hidden', dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], ) @@ -97,7 +97,8 @@ libv3d_neon = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom, inc_gallium_drivers, ], - c_args : [c_vis_args, v3d_args, v3d_neon_c_args], + c_args : [v3d_args, v3d_neon_c_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], ) @@ -112,8 +113,9 @@ libv3d = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom, inc_gallium_drivers, ], - c_args : [c_vis_args, v3d_args], - cpp_args : [cpp_vis_args, v3d_args], + c_args : [v3d_args], + cpp_args : [v3d_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], link_with: [per_version_libs, libv3d_neon], ) diff --git a/src/gallium/drivers/vc4/meson.build b/src/gallium/drivers/vc4/meson.build index 5ce5af5f6b4..90a772d5dc6 100644 --- a/src/gallium/drivers/vc4/meson.build +++ b/src/gallium/drivers/vc4/meson.build @@ -108,8 +108,8 @@ libvc4 = static_library( inc_gallium_drivers, ], link_with: libvc4_neon, - c_args : [c_vis_args, vc4_c_args], - cpp_args : [cpp_vis_args], + c_args : [vc4_c_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind, idep_nir_headers], build_by_default : false, ) diff --git a/src/gallium/drivers/virgl/meson.build b/src/gallium/drivers/virgl/meson.build index dd33d2b7c66..f94099bc200 100644 --- a/src/gallium/drivers/virgl/meson.build +++ b/src/gallium/drivers/virgl/meson.build @@ -46,7 +46,7 @@ virgl_driinfo_h = custom_target( libvirgl = static_library( 'virgl', [ files_libvirgl, virgl_driinfo_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], dependencies : dep_libdrm ) diff --git a/src/gallium/drivers/zink/meson.build b/src/gallium/drivers/zink/meson.build index 15f79b62303..a104c1841fd 100644 --- a/src/gallium/drivers/zink/meson.build +++ b/src/gallium/drivers/zink/meson.build @@ -54,7 +54,7 @@ zink_nir_algebraic_c = custom_target( libzink = static_library( 'zink', [files_libzink, zink_nir_algebraic_c], - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies: [dep_vulkan, idep_nir_headers], ) diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build index 7606a6beaf6..4d429b9a28c 100644 --- a/src/gallium/frontends/clover/meson.build +++ b/src/gallium/frontends/clover/meson.build @@ -63,7 +63,6 @@ libclllvm = static_library( clover_cpp_args, clover_opencl_cpp_args, clover_spirv_cpp_args, - cpp_vis_args, '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('includedir')), '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('libexecdir')), '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths( @@ -71,6 +70,7 @@ libclllvm = static_library( dep_llvm.version(), 'include', )), ], + gnu_symbol_visibility : 'hidden', dependencies : [dep_llvm, dep_elf, dep_llvmspirvlib], override_options : clover_cpp_std, ) @@ -79,7 +79,8 @@ libclspirv = static_library( 'clspirv', files('spirv/invocation.cpp', 'spirv/invocation.hpp'), include_directories : clover_incs, - cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args, cpp_vis_args], + cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_spirv_tools], override_options : clover_cpp_std, ) @@ -89,7 +90,8 @@ libclnir = static_library( files('nir/invocation.cpp', 'nir/invocation.hpp'), include_directories : [clover_incs, inc_mesa], dependencies : idep_nir, - cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args, cpp_vis_args], + cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args], + gnu_symbol_visibility : 'hidden', override_options : clover_cpp_std, ) @@ -157,8 +159,8 @@ libclover = static_library( clover_opencl_cpp_args, clover_spirv_cpp_args, clover_cpp_args, - cpp_vis_args ], + gnu_symbol_visibility : 'hidden', link_with : [libclllvm, libclspirv, libclnir], override_options : clover_cpp_std, ) diff --git a/src/gallium/frontends/dri/meson.build b/src/gallium/frontends/dri/meson.build index 4bb41157e42..21390865fd3 100644 --- a/src/gallium/frontends/dri/meson.build +++ b/src/gallium/frontends/dri/meson.build @@ -53,6 +53,7 @@ libdri = static_library( inc_include, inc_util, inc_mesa, inc_mapi, inc_src, inc_gallium, inc_gallium_aux, inc_dri_common, ], - c_args : [c_vis_args, libdri_c_args], + c_args : [libdri_c_args], + gnu_symbol_visibility : 'hidden', dependencies : dep_libdrm, ) diff --git a/src/gallium/frontends/glx/xlib/meson.build b/src/gallium/frontends/glx/xlib/meson.build index 7b1fdb34ffe..2ebec600b89 100644 --- a/src/gallium/frontends/glx/xlib/meson.build +++ b/src/gallium/frontends/glx/xlib/meson.build @@ -21,7 +21,7 @@ libxlib = static_library( 'xlib', files('glx_api.c', 'glx_getproc.c', 'glx_usefont.c', 'xm_api.c', 'xm_st.c'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa], dependencies : [dep_x11, dep_xext, dep_xcb, dep_glproto], ) diff --git a/src/gallium/frontends/hgl/meson.build b/src/gallium/frontends/hgl/meson.build index 3c5870fe101..89877158d36 100644 --- a/src/gallium/frontends/hgl/meson.build +++ b/src/gallium/frontends/hgl/meson.build @@ -37,5 +37,6 @@ libsthgl = static_library( inc_include, inc_haikugl, inc_util, inc_mesa, inc_mapi, inc_src, inc_gallium, inc_gallium_aux ], - c_args : [c_vis_args, libsthgl_c_args], + c_args : [libsthgl_c_args], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gallium/frontends/nine/meson.build b/src/gallium/frontends/nine/meson.build index 7c9e035cafc..14ab178eb4a 100644 --- a/src/gallium/frontends/nine/meson.build +++ b/src/gallium/frontends/nine/meson.build @@ -62,7 +62,7 @@ nine_st_files = files( libnine_st = static_library( 'nine_st', nine_st_files, - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [ inc_d3d9, inc_gallium, inc_include, inc_src, inc_gallium_aux, ], diff --git a/src/gallium/frontends/omx/meson.build b/src/gallium/frontends/omx/meson.build index 35866c1cba0..650d87c625e 100644 --- a/src/gallium/frontends/omx/meson.build +++ b/src/gallium/frontends/omx/meson.build @@ -65,7 +65,8 @@ endif libomx_st = static_library( 'omx_st', files_omx, - c_args : [c_vis_args, '-fcommon'], + c_args : ['-fcommon'], + gnu_symbol_visibility : 'hidden', include_directories : inc_st_omx, dependencies : dep_st_omx, ) diff --git a/src/gallium/frontends/va/meson.build b/src/gallium/frontends/va/meson.build index 1929d907b9d..c1d6f2a099b 100644 --- a/src/gallium/frontends/va/meson.build +++ b/src/gallium/frontends/va/meson.build @@ -29,11 +29,11 @@ libva_st = static_library( 'subpicture.c', 'surface.c', 'picture_h264_enc.c', 'picture_hevc_enc.c', ), c_args : [ - c_vis_args, '-DVA_DRIVER_INIT_FUNC=__vaDriverInit_@0@_@1@'.format( libva_version[0], libva_version[1] ), ], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [ dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, diff --git a/src/gallium/frontends/vdpau/meson.build b/src/gallium/frontends/vdpau/meson.build index 28c4e9cab76..6f318df093e 100644 --- a/src/gallium/frontends/vdpau/meson.build +++ b/src/gallium/frontends/vdpau/meson.build @@ -28,10 +28,10 @@ libvdpau_st = static_library( 'output.c', 'preemption.c', 'presentation.c', 'query.c', 'surface.c', ), c_args : [ - c_vis_args, '-DVER_MAJOR=@0@'.format(VDPAU_MAJOR), '-DVER_MINOR=@0@'.format(VDPAU_MINOR), ], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_include, inc_src, inc_util, inc_gallium, inc_gallium_aux, ], diff --git a/src/gallium/frontends/xa/meson.build b/src/gallium/frontends/xa/meson.build index 0c3540f0359..3bc1783acb7 100644 --- a/src/gallium/frontends/xa/meson.build +++ b/src/gallium/frontends/xa/meson.build @@ -38,7 +38,8 @@ libxa_st = static_library( 'xa_composite.c', 'xa_context.c', 'xa_renderer.c', 'xa_tgsi.c', 'xa_tracker.c', 'xa_yuv.c', )], - c_args : [c_vis_args, '-pedantic'], + c_args : ['-pedantic'], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], ) diff --git a/src/gallium/frontends/xvmc/meson.build b/src/gallium/frontends/xvmc/meson.build index 9022bf4d0a6..6ed9f30248b 100644 --- a/src/gallium/frontends/xvmc/meson.build +++ b/src/gallium/frontends/xvmc/meson.build @@ -21,7 +21,7 @@ libxvmc_st = static_library( 'xvmc_st', files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'), - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [ dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv, diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build index 23a19c77508..daef41613db 100644 --- a/src/gallium/targets/d3dadapter9/meson.build +++ b/src/gallium/targets/d3dadapter9/meson.build @@ -55,8 +55,8 @@ libgallium_nine = shared_library( inc_gallium_drivers, inc_d3d9, include_directories('../../frontends/nine'), ], - c_args : [c_vis_args, gallium_nine_c_args], - cpp_args : [cpp_vis_args], + c_args : [gallium_nine_c_args], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_build_id, ld_args_gc_sections, gallium_nine_ld_args], link_depends : gallium_nine_link_depends, link_with : gallium_nine_link_with, diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index 2c80bf12090..7cd8666dcf2 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -44,8 +44,7 @@ libgallium_dri = shared_library( inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_dri_common, inc_gallium_drivers, inc_gallium_winsys, include_directories('../../frontends/dri'), ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args], link_depends : gallium_dri_link_depends, link_with : [ diff --git a/src/gallium/targets/graw-gdi/meson.build b/src/gallium/targets/graw-gdi/meson.build index 563801cddd8..782ffeaf16e 100644 --- a/src/gallium/targets/graw-gdi/meson.build +++ b/src/gallium/targets/graw-gdi/meson.build @@ -21,7 +21,8 @@ libgraw_gdi = shared_library( 'graw', 'graw_gdi.c', - c_args : [c_vis_args, c_msvc_compat_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_gallium_winsys_sw, diff --git a/src/gallium/targets/graw-null/meson.build b/src/gallium/targets/graw-null/meson.build index 39471b64064..7755c396e96 100644 --- a/src/gallium/targets/graw-null/meson.build +++ b/src/gallium/targets/graw-null/meson.build @@ -21,14 +21,16 @@ libgraw_util = static_library( 'graw_util', ['graw_util.c'], - c_args : [c_vis_args, c_msvc_compat_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], ) libgraw_null = shared_library( 'graw_null', ['graw_null.c'], - c_args : [c_vis_args, c_msvc_compat_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], link_with : libgallium, dependencies : idep_mesautil, diff --git a/src/gallium/targets/graw-xlib/meson.build b/src/gallium/targets/graw-xlib/meson.build index 0e5d91b9fdd..d7b5fc91d1a 100644 --- a/src/gallium/targets/graw-xlib/meson.build +++ b/src/gallium/targets/graw-xlib/meson.build @@ -21,7 +21,7 @@ libgraw_xlib = shared_library( 'graw_xlib', ['graw_xlib.c'], - 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_gallium_drivers, inc_gallium_winsys], link_with : [ libgraw_util, libgallium, libws_xlib diff --git a/src/gallium/targets/haiku-softpipe/meson.build b/src/gallium/targets/haiku-softpipe/meson.build index addea41538a..2fe6ad653ef 100644 --- a/src/gallium/targets/haiku-softpipe/meson.build +++ b/src/gallium/targets/haiku-softpipe/meson.build @@ -26,8 +26,7 @@ libswpipe = shared_library( include_directories('../../frontends/hgl'), include_directories('/boot/system/develop/headers/private') ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_bsymbolic, ld_args_gc_sections], link_with : [ libglapi, libswhgl, libsthgl, libcompiler, diff --git a/src/gallium/targets/libgl-xlib/meson.build b/src/gallium/targets/libgl-xlib/meson.build index 4cd673ed34e..6aa450e9fc6 100644 --- a/src/gallium/targets/libgl-xlib/meson.build +++ b/src/gallium/targets/libgl-xlib/meson.build @@ -44,7 +44,8 @@ libgl = shared_library( inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_gallium_winsys, inc_gallium_drivers, include_directories('../../frontends/glx/xlib'), ], - c_args : [c_vis_args, gallium_xlib_c_args], + c_args : [gallium_xlib_c_args], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_bsymbolic, ld_args_gc_sections, gallium_xlib_ld_args], link_depends : gallium_xlib_link_depends, link_with : [ diff --git a/src/gallium/targets/omx/meson.build b/src/gallium/targets/omx/meson.build index 86311c30cb9..3585ee652b2 100644 --- a/src/gallium/targets/omx/meson.build +++ b/src/gallium/targets/omx/meson.build @@ -33,8 +33,7 @@ endif libomx_gallium = shared_library( 'omx_mesa', 'target.c', - c_args : c_vis_args, - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : [omx_link_args, ld_args_gc_sections], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers, diff --git a/src/gallium/targets/osmesa/meson.build b/src/gallium/targets/osmesa/meson.build index 92cd0aa06a5..b17131f1cbe 100644 --- a/src/gallium/targets/osmesa/meson.build +++ b/src/gallium/targets/osmesa/meson.build @@ -41,8 +41,7 @@ endif libosmesa = shared_library( osmesa_lib_name, 'target.c', - c_args : [c_vis_args], - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections, osmesa_link_args], vs_module_defs : osmesa_def, include_directories : [ diff --git a/src/gallium/targets/pipe-loader/meson.build b/src/gallium/targets/pipe-loader/meson.build index 4be3a59971b..ecc00703641 100644 --- a/src/gallium/targets/pipe-loader/meson.build +++ b/src/gallium/targets/pipe-loader/meson.build @@ -73,8 +73,9 @@ foreach x : pipe_loaders shared_library( 'pipe_@0@'.format(x[1]), 'pipe_@0@.c'.format(x[1]), - c_args : [pipe_loader_comp_args, c_vis_args], - cpp_args : [pipe_loader_comp_args, cpp_vis_args], + c_args : [pipe_loader_comp_args], + cpp_args : [pipe_loader_comp_args], + gnu_symbol_visibility : 'hidden', link_args : pipe_loader_link_args, link_depends : pipe_loader_link_deps, include_directories : pipe_loader_incs, diff --git a/src/gallium/targets/va/meson.build b/src/gallium/targets/va/meson.build index e9a3ee126fa..8918ef60130 100644 --- a/src/gallium/targets/va/meson.build +++ b/src/gallium/targets/va/meson.build @@ -34,8 +34,7 @@ endif libva_gallium = shared_library( 'gallium_drv_video', 'target.c', - c_args : c_vis_args, - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : [va_link_args, ld_args_gc_sections], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers, diff --git a/src/gallium/targets/vdpau/meson.build b/src/gallium/targets/vdpau/meson.build index 4ea12c4ef02..82c6b6d2287 100644 --- a/src/gallium/targets/vdpau/meson.build +++ b/src/gallium/targets/vdpau/meson.build @@ -39,8 +39,7 @@ endif libvdpau_gallium = shared_library( 'vdpau_gallium', 'target.c', - c_args : c_vis_args, - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : [vdpau_link_args, ld_args_gc_sections], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers, diff --git a/src/gallium/targets/xa/meson.build b/src/gallium/targets/xa/meson.build index d61dbd9842b..1f45bcbb856 100644 --- a/src/gallium/targets/xa/meson.build +++ b/src/gallium/targets/xa/meson.build @@ -35,8 +35,7 @@ _xa_version = '.'.join(xa_version) libxatracker = shared_library( 'xatracker', 'target.c', - c_args : c_vis_args, - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : [xa_link_args, ld_args_gc_sections], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers, diff --git a/src/gallium/targets/xvmc/meson.build b/src/gallium/targets/xvmc/meson.build index b96a9d34465..11a098af6ac 100644 --- a/src/gallium/targets/xvmc/meson.build +++ b/src/gallium/targets/xvmc/meson.build @@ -34,8 +34,7 @@ endif libxvmc_gallium = shared_library( 'XvMCgallium', 'target.c', - c_args : c_vis_args, - cpp_args : cpp_vis_args, + gnu_symbol_visibility : 'hidden', link_args : [xvmc_link_args, ld_args_gc_sections], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers, diff --git a/src/gallium/winsys/amdgpu/drm/meson.build b/src/gallium/winsys/amdgpu/drm/meson.build index ef2705d52ad..d6793eff5d7 100644 --- a/src/gallium/winsys/amdgpu/drm/meson.build +++ b/src/gallium/winsys/amdgpu/drm/meson.build @@ -29,8 +29,7 @@ libamdgpuwinsys = static_library( inc_amd, inc_gallium, inc_gallium_aux, inc_include, inc_src, inc_amd_common, inc_amd_common_llvm, ], - c_args : [c_vis_args], - cpp_args : [cpp_vis_args], + gnu_symbol_visibility : 'hidden', link_with : libamdgpu_addrlib, dependencies : [dep_llvm, dep_libdrm_amdgpu, idep_amdgfxregs_h], ) diff --git a/src/gallium/winsys/freedreno/drm/meson.build b/src/gallium/winsys/freedreno/drm/meson.build index 765ac887d11..c563165d776 100644 --- a/src/gallium/winsys/freedreno/drm/meson.build +++ b/src/gallium/winsys/freedreno/drm/meson.build @@ -28,6 +28,6 @@ libfreedrenowinsys = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_freedreno, ], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm], ) diff --git a/src/gallium/winsys/iris/drm/meson.build b/src/gallium/winsys/iris/drm/meson.build index 3f8e2a8c63c..3dcdc4a455e 100644 --- a/src/gallium/winsys/iris/drm/meson.build +++ b/src/gallium/winsys/iris/drm/meson.build @@ -25,5 +25,5 @@ libiriswinsys = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, ], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gallium/winsys/kmsro/drm/meson.build b/src/gallium/winsys/kmsro/drm/meson.build index 13ed5a0ea43..cec92b1fa15 100644 --- a/src/gallium/winsys/kmsro/drm/meson.build +++ b/src/gallium/winsys/kmsro/drm/meson.build @@ -45,7 +45,8 @@ libkmsrowinsys = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_winsys, ], - c_args : [c_vis_args, kmsro_c_args], + c_args : [kmsro_c_args], + gnu_symbol_visibility : 'hidden', dependencies: dep_libdrm, ) diff --git a/src/gallium/winsys/nouveau/drm/meson.build b/src/gallium/winsys/nouveau/drm/meson.build index cf661971f8b..a6f1f8a6b4f 100644 --- a/src/gallium/winsys/nouveau/drm/meson.build +++ b/src/gallium/winsys/nouveau/drm/meson.build @@ -24,6 +24,6 @@ libnouveauwinsys = static_library( include_directories : [ inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, ], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm_nouveau], ) diff --git a/src/gallium/winsys/panfrost/drm/meson.build b/src/gallium/winsys/panfrost/drm/meson.build index d19ce2ddb8b..84aa9ba5602 100644 --- a/src/gallium/winsys/panfrost/drm/meson.build +++ b/src/gallium/winsys/panfrost/drm/meson.build @@ -25,5 +25,5 @@ libpanfrostwinsys = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, ], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gallium/winsys/radeon/drm/meson.build b/src/gallium/winsys/radeon/drm/meson.build index d123df0502b..ae5382a5d99 100644 --- a/src/gallium/winsys/radeon/drm/meson.build +++ b/src/gallium/winsys/radeon/drm/meson.build @@ -24,6 +24,6 @@ libradeonwinsys = static_library( 'radeon_drm_cs.h', 'radeon_drm_public.h', 'radeon_drm_surface.c', 'radeon_drm_winsys.c', 'radeon_drm_winsys.h'), include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', dependencies : [dep_libdrm_radeon], ) diff --git a/src/gallium/winsys/svga/drm/meson.build b/src/gallium/winsys/svga/drm/meson.build index 55266ce1623..5f3065e10a5 100644 --- a/src/gallium/winsys/svga/drm/meson.build +++ b/src/gallium/winsys/svga/drm/meson.build @@ -37,7 +37,8 @@ files_svgadrm = files( libsvgadrm = static_library( 'svgadrm', files_svgadrm, - c_args : [c_vis_args, c_msvc_compat_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', include_directories : [ inc_src, inc_include, inc_gallium, inc_gallium_aux, include_directories('../../../drivers/svga', '../../../drivers/svga/include'), diff --git a/src/gallium/winsys/sw/dri/meson.build b/src/gallium/winsys/sw/dri/meson.build index 0de62226b96..49a0da82726 100644 --- a/src/gallium/winsys/sw/dri/meson.build +++ b/src/gallium/winsys/sw/dri/meson.build @@ -22,6 +22,6 @@ libswdri = static_library( 'swdri', files('dri_sw_winsys.c', 'dri_sw_winsys.h'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_gallium, inc_include, inc_src, inc_gallium_aux], ) diff --git a/src/gallium/winsys/sw/hgl/meson.build b/src/gallium/winsys/sw/hgl/meson.build index 10096651c99..ceef11bfebd 100644 --- a/src/gallium/winsys/sw/hgl/meson.build +++ b/src/gallium/winsys/sw/hgl/meson.build @@ -21,7 +21,7 @@ libswhgl = static_library( 'swhgl', files('hgl_sw_winsys.c'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_gallium, inc_include, inc_src, inc_gallium_aux, include_directories('../../../frontends/hgl') ], diff --git a/src/gallium/winsys/sw/kms-dri/meson.build b/src/gallium/winsys/sw/kms-dri/meson.build index 9c46d6e5484..36cf568977c 100644 --- a/src/gallium/winsys/sw/kms-dri/meson.build +++ b/src/gallium/winsys/sw/kms-dri/meson.build @@ -22,7 +22,7 @@ libswkmsdri = static_library( 'swkmsdri', files('kms_dri_sw_winsys.c', 'kms_dri_sw_winsys.h'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_gallium, inc_include, inc_src, inc_gallium_aux], dependencies : dep_libdrm, ) diff --git a/src/gallium/winsys/sw/null/meson.build b/src/gallium/winsys/sw/null/meson.build index 08b0ff7e828..32ce1b082d7 100644 --- a/src/gallium/winsys/sw/null/meson.build +++ b/src/gallium/winsys/sw/null/meson.build @@ -21,7 +21,7 @@ libws_null = static_library( 'ws_null', files('null_sw_winsys.c', 'null_sw_winsys.h'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_gallium, inc_src, inc_gallium_aux, inc_include], build_by_default : false, ) diff --git a/src/gallium/winsys/sw/wrapper/meson.build b/src/gallium/winsys/sw/wrapper/meson.build index 4672261f216..f02f5ddf6af 100644 --- a/src/gallium/winsys/sw/wrapper/meson.build +++ b/src/gallium/winsys/sw/wrapper/meson.build @@ -21,7 +21,7 @@ libwsw = static_library( 'wsw', files('wrapper_sw_winsys.c', 'wrapper_sw_winsys.h'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_gallium, inc_include, inc_src, inc_gallium_aux], build_by_default : false, ) diff --git a/src/gallium/winsys/sw/xlib/meson.build b/src/gallium/winsys/sw/xlib/meson.build index d1f5759b052..c1c7eb5b3a5 100644 --- a/src/gallium/winsys/sw/xlib/meson.build +++ b/src/gallium/winsys/sw/xlib/meson.build @@ -21,7 +21,7 @@ libws_xlib = static_library( 'ws_xlib', files('xlib_sw_winsys.c'), - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [dep_x11, dep_xext, dep_xcb], ) diff --git a/src/gallium/winsys/v3d/drm/meson.build b/src/gallium/winsys/v3d/drm/meson.build index e5d7b12d1df..58577709e24 100644 --- a/src/gallium/winsys/v3d/drm/meson.build +++ b/src/gallium/winsys/v3d/drm/meson.build @@ -25,5 +25,5 @@ libv3dwinsys = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, ], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gallium/winsys/vc4/drm/meson.build b/src/gallium/winsys/vc4/drm/meson.build index 55c85734e04..2e4200ef00f 100644 --- a/src/gallium/winsys/vc4/drm/meson.build +++ b/src/gallium/winsys/vc4/drm/meson.build @@ -36,5 +36,6 @@ libvc4winsys = static_library( inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_gallium_winsys, ], - c_args : [c_vis_args, vc4_winsys_c_args], + c_args : [vc4_winsys_c_args], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gallium/winsys/virgl/common/meson.build b/src/gallium/winsys/virgl/common/meson.build index 18a40f28ec1..0fa9e889c1f 100644 --- a/src/gallium/winsys/virgl/common/meson.build +++ b/src/gallium/winsys/virgl/common/meson.build @@ -21,8 +21,8 @@ libvirglcommon = static_library( 'virglcommon', 'virgl_resource_cache.c', - c_args : c_vis_args, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_gallium_drivers], + gnu_symbol_visibility : 'hidden', ) dep_libvirglcommon = declare_dependency( diff --git a/src/gallium/winsys/virgl/drm/meson.build b/src/gallium/winsys/virgl/drm/meson.build index 0bfeafaeae9..cf15b78aff4 100644 --- a/src/gallium/winsys/virgl/drm/meson.build +++ b/src/gallium/winsys/virgl/drm/meson.build @@ -21,7 +21,7 @@ libvirgldrm = static_library( 'virgldrm', 'virgl_drm_winsys.c', - c_args : c_vis_args, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_gallium_drivers], dependencies : [dep_libdrm, dep_libvirglcommon], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gallium/winsys/virgl/vtest/meson.build b/src/gallium/winsys/virgl/vtest/meson.build index 6363e62c747..f8b38b42d7a 100644 --- a/src/gallium/winsys/virgl/vtest/meson.build +++ b/src/gallium/winsys/virgl/vtest/meson.build @@ -21,7 +21,7 @@ libvirglvtest = static_library( 'virglvtest', ['virgl_vtest_socket.c', 'virgl_vtest_winsys.c'], - c_args : c_vis_args, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_gallium_drivers], dependencies : dep_libvirglcommon, + gnu_symbol_visibility : 'hidden', ) diff --git a/src/gbm/meson.build b/src/gbm/meson.build index ed4310d6598..2a9be93450b 100644 --- a/src/gbm/meson.build +++ b/src/gbm/meson.build @@ -47,10 +47,11 @@ libgbm = shared_library( 'gbm', files_gbm, include_directories : incs_gbm, - c_args : [c_vis_args, args_gbm], + c_args : [args_gbm], link_args : [ld_args_gc_sections], link_with : libloader, dependencies : [deps_gbm, dep_dl, dep_thread, idep_mesautil, idep_xmlconfig], + gnu_symbol_visibility : 'hidden', version : '1.0.0', install : true, ) diff --git a/src/glx/apple/meson.build b/src/glx/apple/meson.build index c6b1d617c4f..86c4c76367d 100644 --- a/src/glx/apple/meson.build +++ b/src/glx/apple/meson.build @@ -56,6 +56,6 @@ libappleglx = static_library( [files_libappleglx, glapitable_h], include_directories: [inc_mesa, inc_glx, inc_src, inc_include, inc_glapi], dependencies: [dep_xext, dep_xplugin], - c_args: [c_vis_args], + gnu_symbol_visibility : 'hidden', build_by_default: false, ) diff --git a/src/glx/meson.build b/src/glx/meson.build index bbbd3d65a4f..bceed2f5fc7 100644 --- a/src/glx/meson.build +++ b/src/glx/meson.build @@ -136,9 +136,10 @@ libglx = static_library( [files_libglx, glx_generated], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glapi, inc_loader], c_args : [ - c_vis_args, gl_lib_cargs, + gl_lib_cargs, '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]), ], + gnu_symbol_visibility : 'hidden', link_with : [ libloader, libloader_dri3_helper, extra_libs_libglx, diff --git a/src/glx/windows/meson.build b/src/glx/windows/meson.build index 153f41ab783..0e69d457c3d 100644 --- a/src/glx/windows/meson.build +++ b/src/glx/windows/meson.build @@ -63,6 +63,6 @@ libwindowsglx = static_library( 'glxwindows', [files_libwindowsglx, files_windowsdriproto], include_directories: [inc_include, inc_src, inc_glapi], - c_args : [c_vis_args], + gnu_symbol_visibility : 'hidden', build_by_default: false, ) diff --git a/src/intel/blorp/meson.build b/src/intel/blorp/meson.build index 6696a3dcb3c..9d2dee9de9c 100644 --- a/src/intel/blorp/meson.build +++ b/src/intel/blorp/meson.build @@ -32,6 +32,7 @@ libblorp = static_library( 'blorp', files_libblorp, include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', dependencies : [idep_nir_headers, idep_genxml], ) diff --git a/src/intel/common/meson.build b/src/intel/common/meson.build index 0134dfb4597..1c3a24e587f 100644 --- a/src/intel/common/meson.build +++ b/src/intel/common/meson.build @@ -44,7 +44,8 @@ libintel_common = static_library( ['intel_common', genX_xml_h], files_libintel_common, include_directories : [inc_include, inc_src, inc_mesa, inc_gallium, inc_intel], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', link_with : [libisl], dependencies : [dep_expat, dep_libdrm, dep_thread, idep_genxml], ) @@ -68,9 +69,10 @@ if install_intel_gpu_tests 'intel_@0@_mi_builder_test'.format(g[1]), files('tests/gen_mi_builder_test.cpp'), cpp_args : [ - cpp_vis_args, cpp_msvc_compat_args, + cpp_msvc_compat_args, '-DGEN_VERSIONx10=@0@'.format(g[0]) ], + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_intel], link_with : [libintel_dev], dependencies : [dep_libdrm, idep_gtest, idep_genxml, idep_mesautil], diff --git a/src/intel/compiler/meson.build b/src/intel/compiler/meson.build index 6a609869405..480185a0913 100644 --- a/src/intel/compiler/meson.build +++ b/src/intel/compiler/meson.build @@ -142,8 +142,8 @@ libintel_compiler = static_library( 'intel_compiler', [libintel_compiler_files, brw_nir_trig, ir_expression_operation_h], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], - 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 : idep_nir_headers, build_by_default : false, ) diff --git a/src/intel/dev/meson.build b/src/intel/dev/meson.build index 55dbb1cf763..d79834d4c0b 100644 --- a/src/intel/dev/meson.build +++ b/src/intel/dev/meson.build @@ -31,7 +31,8 @@ libintel_dev = static_library( ['intel_dev'], files_libintel_dev, include_directories : [inc_include, inc_src, inc_intel], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', ) if with_tests diff --git a/src/intel/isl/meson.build b/src/intel/isl/meson.build index e512169e6cb..66f19039ce2 100644 --- a/src/intel/isl/meson.build +++ b/src/intel/isl/meson.build @@ -63,8 +63,11 @@ foreach g : [['40', isl_gen4_files], ['50', []], ['60', isl_gen6_files], 'isl_gen@0@'.format(_gen), [g[1], isl_gen_files, gen_xml_pack], include_directories : [inc_include, inc_src, inc_gallium, inc_intel], - c_args : [c_vis_args, no_override_init_args, - '-DGEN_VERSIONx10=@0@'.format(_gen)], + c_args : [ + no_override_init_args, + '-DGEN_VERSIONx10=@0@'.format(_gen) + ], + gnu_symbol_visibility : 'hidden', ) endforeach @@ -89,7 +92,8 @@ isl_tiled_memcpy = static_library( include_directories : [ inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, ], - c_args : [c_vis_args, no_override_init_args, '-msse2'], + c_args : [no_override_init_args, '-msse2'], + gnu_symbol_visibility : 'hidden', extra_files : ['isl_tiled_memcpy.c'] ) @@ -101,7 +105,8 @@ if with_sse41 inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, ], link_args : ['-Wl,--exclude-libs=ALL'], - c_args : [c_vis_args, no_override_init_args, '-msse2', sse41_args], + c_args : [no_override_init_args, '-msse2', sse41_args], + gnu_symbol_visibility : 'hidden', extra_files : ['isl_tiled_memcpy.c'] ) else @@ -124,7 +129,8 @@ libisl = static_library( [libisl_files, isl_format_layout_c, genX_bits_h], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], link_with : [isl_gen_libs, isl_tiled_memcpy, isl_tiled_memcpy_sse41], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', ) if with_tests diff --git a/src/intel/perf/meson.build b/src/intel/perf/meson.build index ef8344d584c..1fe673c2d77 100644 --- a/src/intel/perf/meson.build +++ b/src/intel/perf/meson.build @@ -38,6 +38,7 @@ libintel_perf = static_library( include_directories : [ inc_include, inc_src, inc_intel, ], - c_args : [c_vis_args, no_override_init_args, '-msse2'], - cpp_args : [cpp_vis_args, '-msse2'], + c_args : [no_override_init_args, '-msse2'], + cpp_args : ['-msse2'], + gnu_symbol_visibility : 'hidden', ) diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build index 59d63576d8e..063e7373ab3 100644 --- a/src/intel/tools/meson.build +++ b/src/intel/tools/meson.build @@ -24,7 +24,8 @@ libaub = static_library( include_directories : [inc_include, inc_src, inc_intel], dependencies : idep_mesautil, link_with : [libintel_common, libintel_dev], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install : false ) @@ -34,7 +35,8 @@ aubinator = executable( dependencies : [idep_mesautil, dep_expat, dep_zlib, dep_dl, dep_thread, dep_m], include_directories : [inc_include, inc_src, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev, libaub], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install : true ) @@ -44,7 +46,8 @@ aubinator_error_decode = executable( dependencies : [idep_mesautil, dep_zlib, dep_thread], include_directories : [inc_include, inc_src, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install : true ) @@ -54,7 +57,8 @@ i965_disasm = executable( dependencies : [idep_mesautil, dep_thread], include_directories : [inc_include, inc_src, inc_mesa, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install : true ) @@ -64,7 +68,8 @@ error2aub = executable( dependencies : [dep_zlib, dep_dl, dep_thread, dep_m], include_directories : [inc_include, inc_src, inc_intel], link_with : [libintel_dev], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install : true ) @@ -91,7 +96,8 @@ libintel_sanitize_gpu = shared_library( dependencies : [idep_mesautil, dep_dl, dep_thread], include_directories : [inc_include, inc_src, inc_intel], link_with : libintel_common, - c_args : [c_vis_args, no_override_init_args, c_sse2_args], + c_args : [no_override_init_args, c_sse2_args], + gnu_symbol_visibility : 'hidden', install_dir : get_option('libexecdir'), install : true ) @@ -113,7 +119,8 @@ libintel_dump_gpu = shared_library( dependencies : dep_dl, include_directories : [inc_include, inc_src, inc_intel], link_with : libintel_dev, - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install_dir : get_option('libexecdir'), install : true ) @@ -133,7 +140,7 @@ if with_tools.contains('drm-shim') include_directories: [inc_include, inc_src, inc_intel], link_with: libintel_dev, dependencies: [dep_libdrm, dep_drm_shim, idep_mesautil, idep_libintel_common], - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', install : true, ) endif @@ -147,7 +154,8 @@ if with_tools.contains('intel-ui') dependencies : [idep_mesautil, dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep], include_directories : [inc_include, inc_src, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev, libaub], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', cpp_args : ['-fpermissive', '-Wno-parentheses', '-Wno-class-memaccess'], install : true ) @@ -176,7 +184,8 @@ i965_asm = executable( dependencies : [idep_mesautil, dep_thread], include_directories : [inc_include, inc_src, inc_mesa, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev], - c_args : [c_vis_args, no_override_init_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', install : true ) diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index 5884ac05647..1990e0c4e8f 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -89,9 +89,10 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', ['gen7_cmd_buffer.c']], inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_compiler, inc_intel, inc_vulkan_wsi, ], c_args : [ - c_vis_args, no_override_init_args, c_sse2_args, + no_override_init_args, c_sse2_args, '-DGEN_VERSIONx10=@0@'.format(_gen), ], + gnu_symbol_visibility : 'hidden', dependencies : [ dep_libdrm, dep_valgrind, idep_nir_headers, idep_genxml, idep_vulkan_util_headers, ], @@ -136,7 +137,6 @@ anv_deps = [ idep_xmlconfig_headers, ] anv_flags = [ - c_vis_args, no_override_init_args, c_sse2_args, ] @@ -184,6 +184,7 @@ libanv_common = static_library( inc_vulkan_wsi, inc_util, ], c_args : anv_flags, + gnu_symbol_visibility : 'hidden', dependencies : anv_deps, ) @@ -203,6 +204,7 @@ libvulkan_intel = shared_library( idep_nir, idep_genxml, idep_vulkan_util, idep_mesautil, idep_xmlconfig, ], c_args : anv_flags, + gnu_symbol_visibility : 'hidden', link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections], install : true, ) @@ -237,6 +239,7 @@ if with_tests idep_nir, idep_vulkan_util, idep_mesautil, ], c_args : anv_flags, + gnu_symbol_visibility : 'hidden', ) foreach t : ['block_pool_no_free', 'block_pool_grow_first', diff --git a/src/loader/meson.build b/src/loader/meson.build index e7dce88d443..8c6f2caa5ae 100644 --- a/src/loader/meson.build +++ b/src/loader/meson.build @@ -24,7 +24,7 @@ if with_platform_x11 and with_dri3 libloader_dri3_helper = static_library( 'loader_dri3_helper', 'loader_dri3_helper.c', - c_args : c_vis_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src], dependencies : [ dep_libdrm, dep_xcb_dri3, dep_xcb_present, dep_xcb_sync, dep_xshmfence, @@ -36,7 +36,7 @@ else endif loader_c_args = [ - c_vis_args, '-DUSE_DRICONF', + '-DUSE_DRICONF', '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path), ] @@ -48,6 +48,7 @@ libloader = static_library( 'loader', ['loader.c', 'pci_id_driver_map.c'], c_args : loader_c_args, + gnu_symbol_visibility : 'hidden', include_directories : [inc_include, inc_src, inc_util], dependencies : [dep_libdrm, dep_thread, idep_xmlconfig_headers], build_by_default : false, diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build index 711048421b8..f8b4d045c92 100644 --- a/src/mapi/es1api/meson.build +++ b/src/mapi/es1api/meson.build @@ -37,12 +37,12 @@ libglesv1_cm = shared_library( ['../entry.c', es1_glapi_mapi_tmp_h], c_args : [ c_msvc_compat_args, - c_vis_args, _es1_c_args, '-DMAPI_MODE_BRIDGE', '-DMAPI_ABI_HEADER="@0@"'.format(es1_glapi_mapi_tmp_h.full_path()), gcc_lto_quirk, ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [inc_src, inc_include, inc_mapi], link_with : libglapi, diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build index ac79aa66f89..63a5a66b213 100644 --- a/src/mapi/es2api/meson.build +++ b/src/mapi/es2api/meson.build @@ -37,12 +37,12 @@ libgles2 = shared_library( ['../entry.c', es2_glapi_mapi_tmp_h], c_args : [ c_msvc_compat_args, - c_vis_args, _es2_c_args, '-DMAPI_MODE_BRIDGE', '-DMAPI_ABI_HEADER="@0@"'.format(es2_glapi_mapi_tmp_h.full_path()), gcc_lto_quirk, ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [inc_src, inc_include, inc_mapi], link_with : libglapi, diff --git a/src/mapi/shared-glapi/meson.build b/src/mapi/shared-glapi/meson.build index 5b9db0c081a..68fa50d82e6 100644 --- a/src/mapi/shared-glapi/meson.build +++ b/src/mapi/shared-glapi/meson.build @@ -47,11 +47,11 @@ libglapi = shared_library( c_args : [ _glapi_c_args, c_msvc_compat_args, - c_vis_args, '-DMAPI_MODE_GLAPI', '-DMAPI_ABI_HEADER="@0@"'.format(shared_glapi_mapi_tmp_h.full_path()), gcc_lto_quirk, ], + gnu_symbol_visibility : 'hidden', link_args : [ld_args_gc_sections], include_directories : [inc_src, inc_include, inc_mapi], dependencies : [dep_thread, dep_selinux], 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], diff --git a/src/meson.build b/src/meson.build index 8d8bac6a238..26a815d6a15 100644 --- a/src/meson.build +++ b/src/meson.build @@ -35,7 +35,7 @@ libglsl_util = static_library( 'mesa/program/dummy_errors.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', build_by_default : false, ) diff --git a/src/panfrost/bifrost/meson.build b/src/panfrost/bifrost/meson.build index 6978fddca57..83389466be5 100644 --- a/src/panfrost/bifrost/meson.build +++ b/src/panfrost/bifrost/meson.build @@ -53,7 +53,7 @@ libpanfrost_bifrost = static_library( include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw], dependencies: [idep_nir], link_with: [libpanfrost_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', build_by_default : false, ) diff --git a/src/panfrost/encoder/meson.build b/src/panfrost/encoder/meson.build index de45322c578..0086834977b 100644 --- a/src/panfrost/encoder/meson.build +++ b/src/panfrost/encoder/meson.build @@ -38,8 +38,8 @@ libpanfrost_encoder = static_library( 'panfrost_encoder', [libpanfrost_encoder_files], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw], - 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], build_by_default : false, ) diff --git a/src/panfrost/midgard/meson.build b/src/panfrost/midgard/meson.build index 43ae2d87635..c25466161b8 100644 --- a/src/panfrost/midgard/meson.build +++ b/src/panfrost/midgard/meson.build @@ -71,7 +71,7 @@ libpanfrost_midgard = static_library( idep_nir ], link_with: [libpanfrost_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', build_by_default : false, ) diff --git a/src/panfrost/pandecode/meson.build b/src/panfrost/pandecode/meson.build index 1add7d53c50..245e80ebf8a 100644 --- a/src/panfrost/pandecode/meson.build +++ b/src/panfrost/pandecode/meson.build @@ -29,7 +29,7 @@ libpanfrost_decode = static_library( 'panfrost_decode', [libpanfrost_decode_files], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost], - c_args : [c_vis_args, no_override_init_args], - cpp_args : [cpp_vis_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) diff --git a/src/panfrost/shared/meson.build b/src/panfrost/shared/meson.build index 0a342e39701..1884846f075 100644 --- a/src/panfrost/shared/meson.build +++ b/src/panfrost/shared/meson.build @@ -31,7 +31,7 @@ libpanfrost_shared = static_library( 'panfrost_shared', [libpanfrost_shared_files], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], - c_args : [c_vis_args, no_override_init_args, '-O3'], - cpp_args : [cpp_vis_args], + c_args : [no_override_init_args, '-O3'], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) diff --git a/src/panfrost/util/meson.build b/src/panfrost/util/meson.build index 04271a6bb02..e9c2d133b16 100644 --- a/src/panfrost/util/meson.build +++ b/src/panfrost/util/meson.build @@ -35,7 +35,7 @@ libpanfrost_util = static_library( [libpanfrost_util_files], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw], dependencies: [idep_nir], - c_args : [c_vis_args, no_override_init_args], - cpp_args : [cpp_vis_args], + c_args : [no_override_init_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) diff --git a/src/util/format/meson.build b/src/util/format/meson.build index 4d60e6ed80e..34615fd35cd 100644 --- a/src/util/format/meson.build +++ b/src/util/format/meson.build @@ -45,6 +45,7 @@ libmesa_format = static_library( [files_mesa_format, u_format_table_c], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : dep_m, - c_args : [c_msvc_compat_args, c_vis_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', build_by_default : false ) diff --git a/src/util/meson.build b/src/util/meson.build index 1fda53bafd5..2dbdd43d6b7 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -171,7 +171,8 @@ _libmesa_util = static_library( include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : deps_for_libmesa_util, link_with: libmesa_format, - c_args : [c_msvc_compat_args, c_vis_args], + c_args : [c_msvc_compat_args], + gnu_symbol_visibility : 'hidden', build_by_default : false ) @@ -187,7 +188,7 @@ _libxmlconfig = static_library( include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [idep_mesautil, dep_expat, dep_m], c_args : [ - c_msvc_compat_args, c_vis_args, + c_msvc_compat_args, '-DSYSCONFDIR="@0@"'.format( join_paths(get_option('prefix'), get_option('sysconfdir')) ), @@ -195,6 +196,7 @@ _libxmlconfig = static_library( join_paths(get_option('prefix'), get_option('datadir')) ), ], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) diff --git a/src/vulkan/device-select-layer/meson.build b/src/vulkan/device-select-layer/meson.build index f6dc470156a..c5a8e8895f6 100644 --- a/src/vulkan/device-select-layer/meson.build +++ b/src/vulkan/device-select-layer/meson.build @@ -41,7 +41,8 @@ endif vklayer_mesa_device_select = shared_library( 'VkLayer_MESA_device_select', vklayer_files, - c_args : [c_vis_args, no_override_init_args, vklayer_flags ], + c_args : [no_override_init_args, vklayer_flags], + gnu_symbol_visibility : 'hidden', dependencies : [idep_vulkan_util, idep_mesautil, vklayer_deps, dep_libdrm, dep_dl], include_directories : [inc_include, inc_util, inc_vulkan_wsi], link_args : cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro']), diff --git a/src/vulkan/overlay-layer/meson.build b/src/vulkan/overlay-layer/meson.build index 08eaac4163a..37fd7a3412a 100644 --- a/src/vulkan/overlay-layer/meson.build +++ b/src/vulkan/overlay-layer/meson.build @@ -39,8 +39,9 @@ vklayer_files = files( vklayer_mesa_overlay = shared_library( 'VkLayer_MESA_overlay', vklayer_files, overlay_spv, - c_args : [c_vis_args, no_override_init_args, vulkan_wsi_args], - cpp_args : [cpp_vis_args, vulkan_wsi_args], + c_args : [no_override_init_args, vulkan_wsi_args], + cpp_args : [vulkan_wsi_args], + gnu_symbol_visibility : 'hidden', dependencies : [idep_vulkan_util, idep_mesautil, vulkan_wsi_deps, libimgui_core_dep, dep_dl], include_directories : [inc_include, inc_src], link_args : cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro']), diff --git a/src/vulkan/util/meson.build b/src/vulkan/util/meson.build index 8809b2b323c..649179f5230 100644 --- a/src/vulkan/util/meson.build +++ b/src/vulkan/util/meson.build @@ -44,7 +44,8 @@ libvulkan_util = static_library( [files_vulkan_util, vk_enum_to_str], include_directories : [inc_include, inc_src, inc_gallium], dependencies : vulkan_wsi_deps, - c_args : [c_vis_args, vulkan_wsi_args], + c_args : [vulkan_wsi_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build index af3f9c5ced2..d098ba6eb4e 100644 --- a/src/vulkan/wsi/meson.build +++ b/src/vulkan/wsi/meson.build @@ -43,6 +43,7 @@ libvulkan_wsi = static_library( files_vulkan_wsi, include_directories : [inc_include, inc_src], dependencies : [vulkan_wsi_deps, dep_libdrm, idep_vulkan_util, idep_xmlconfig], - c_args : [c_vis_args, vulkan_wsi_args], + c_args : [vulkan_wsi_args], + gnu_symbol_visibility : 'hidden', build_by_default : false, ) -- 2.30.2