Module: Mesa Branch: main Commit: 92fdfea5af8783cae471c510d1fccb1aab4c9a73 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=92fdfea5af8783cae471c510d1fccb1aab4c9a73
Author: Karol Herbst <[email protected]> Date: Wed Jun 21 21:34:43 2023 +0200 rusticl: specify which symbols to export Drops release binary size from 31MB to 29MB Signed-off-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23778> --- src/gallium/targets/rusticl/meson.build | 10 ++++++++++ src/gallium/targets/rusticl/rusticl.sym | 8 ++++++++ 2 files changed, 18 insertions(+) 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 : '@[email protected]'.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: + *; +};
