radv: add exported symbols check
[mesa.git] / src / amd / vulkan / meson.build
index b8e62e6617ae882f26332c1e533044ab03671a59..93523b0e88edce09d47731e43f30abbe14886ba7 100644 (file)
@@ -67,6 +67,7 @@ libradv_files = files(
   'winsys/amdgpu/radv_amdgpu_winsys.c',
   'winsys/amdgpu/radv_amdgpu_winsys.h',
   'winsys/amdgpu/radv_amdgpu_winsys_public.h',
+  'radv_android.c',
   'radv_cmd_buffer.c',
   'radv_cs.h',
   'radv_debug.c',
@@ -139,26 +140,25 @@ if with_xlib_lease
 endif
 
 if with_platform_android
+  radv_deps += dep_android
   radv_flags += [
     '-DVK_USE_PLATFORM_ANDROID_KHR'
   ]
-  libradv_files += files('radv_android.c')
 endif
 
 libvulkan_radeon = shared_library(
   'vulkan_radeon',
   [libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h, xmlpool_options_h, radv_gfx10_format_table_h],
   include_directories : [
-    inc_common, inc_amd, inc_amd_common, inc_compiler, inc_util, inc_vulkan_wsi,
+    inc_common, inc_amd, inc_amd_common, inc_amd_common_llvm, inc_compiler, inc_util, inc_vulkan_wsi,
   ],
   link_with : [
-    libamd_common, libamdgpu_addrlib, libvulkan_wsi,
-    libmesa_util, libxmlconfig
+    libamd_common, libamd_common_llvm, libamdgpu_addrlib, libvulkan_wsi,
   ],
   dependencies : [
     dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
-    dep_valgrind, radv_deps,
-    idep_nir, idep_vulkan_util, idep_amdgfxregs_h,
+    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],
@@ -166,6 +166,19 @@ libvulkan_radeon = shared_library(
   install : true,
 )
 
+if with_tests and prog_nm.found()
+  test(
+    'radv symbols check',
+    symbols_check,
+    args : [
+      '--lib', libvulkan_radeon,
+      '--symbols-file', vulkan_icd_symbols,
+      '--nm', prog_nm.path(),
+    ],
+    suite : ['amd'],
+  )
+endif
+
 radeon_icd = custom_target(
   'radeon_icd',
   input : 'radv_icd.py',