From 92fdfea5af8783cae471c510d1fccb1aab4c9a73 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 21 Jun 2023 21:34:43 +0200 Subject: [PATCH] rusticl: specify which symbols to export Drops release binary size from 31MB to 29MB Signed-off-by: Karol Herbst Part-of: --- src/gallium/targets/rusticl/meson.build | 10 ++++++++++ src/gallium/targets/rusticl/rusticl.sym | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/gallium/targets/rusticl/rusticl.sym diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build index 4a0149fe9ec..36ae0fe677d 100644 --- a/src/gallium/targets/rusticl/meson.build +++ b/src/gallium/targets/rusticl/meson.build @@ -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, ) diff --git a/src/gallium/targets/rusticl/rusticl.sym b/src/gallium/targets/rusticl/rusticl.sym new file mode 100644 index 00000000000..b58239821ae --- /dev/null +++ b/src/gallium/targets/rusticl/rusticl.sym @@ -0,0 +1,8 @@ +{ + global: + clGetPlatformInfo; + clGetExtensionFunctionAddress; + clIcdGetPlatformIDsKHR; + local: + *; +};