aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2020-04-24 13:10:41 -0700
committerMarge Bot <[email protected]>2020-06-01 18:59:18 +0000
commita8e2d79e0228106d11b6ceeb38f4ffb587f0a819 (patch)
tree18eef778716e07f993f568e54920e2242fd0b717 /src/compiler/glsl
parentfc7301865e1eabe06d4225af596e7334c4094fe5 (diff)
meson: use gnu_symbol_visibility argument
This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/glcpp/meson.build13
-rw-r--r--src/compiler/glsl/meson.build20
-rw-r--r--src/compiler/glsl/tests/meson.build15
3 files changed, 30 insertions, 18 deletions
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],