aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
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/intel
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/intel')
-rw-r--r--src/intel/blorp/meson.build3
-rw-r--r--src/intel/common/meson.build6
-rw-r--r--src/intel/compiler/meson.build4
-rw-r--r--src/intel/dev/meson.build3
-rw-r--r--src/intel/isl/meson.build16
-rw-r--r--src/intel/perf/meson.build5
-rw-r--r--src/intel/tools/meson.build29
-rw-r--r--src/intel/vulkan/meson.build7
8 files changed, 48 insertions, 25 deletions
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',