From 8adc13d0c56f6113d88be2170e2fc7021086367c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 24 Feb 2026 17:26:54 +0100 Subject: [PATCH] semihosting: Build stubs once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move stubs to the global stub_ss[] source set. These files are now built once for all binaries, instead of one time per system binary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20260225035739.42848-12-philmd@linaro.org> --- semihosting/meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/semihosting/meson.build b/semihosting/meson.build index 99f10e2e2b..15e3be2698 100644 --- a/semihosting/meson.build +++ b/semihosting/meson.build @@ -1,4 +1,4 @@ -common_ss.add(when: 'CONFIG_SEMIHOSTING', if_false: files('stubs-all.c')) +stub_ss.add(files('stubs-all.c')) user_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( 'user.c', 'guestfd.c')) @@ -8,12 +8,13 @@ system_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( 'guestfd.c', 'uaccess.c', 'syscalls.c', -), if_false: files( +)) +stub_ss.add(files( 'stubs-system.c', )) system_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', - if_true: files('arm-compat-semi.c'), - if_false: files('arm-compat-semi-stub.c')) + if_true: files('arm-compat-semi.c')) +stub_ss.add(files('arm-compat-semi-stub.c')) specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_USER_ONLY'], if_true: files('syscalls.c'))