rusticl: specify which symbols to export

Drops release binary size from 31MB to 29MB

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23778>
This commit is contained in:
Karol Herbst 2023-06-21 21:34:43 +02:00 committed by Marge Bot
parent 72fe01a6be
commit 92fdfea5af
2 changed files with 18 additions and 0 deletions

View file

@ -20,6 +20,14 @@
opencl_version = '1'
rusticl_ld_args = []
rusticl_ld_depends = []
if with_ld_version_script
rusticl_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'rusticl.sym')]
rusticl_ld_depends += files('rusticl.sym')
endif
librusticl = shared_library(
'RusticlOpenCL',
'target.c',
@ -54,7 +62,9 @@ librusticl = shared_library(
link_args : [
ld_args_build_id,
ld_args_gc_sections,
rusticl_ld_args,
],
link_depends : rusticl_ld_depends,
version : '@0@.0.0'.format(opencl_version),
install : true,
)

View file

@ -0,0 +1,8 @@
{
global:
clGetPlatformInfo;
clGetExtensionFunctionAddress;
clIcdGetPlatformIDsKHR;
local:
*;
};