semihosting: Build stubs once
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é <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260225035739.42848-12-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Feb 24, 2026 at 17:26 UTC
8adc13d0c56f6113d88be2170e2fc7021086367c
1 file changed
+5
-4
semihosting/meson.build
+5
-4
@@ -1,4 +1,4 @@
1
-common_ss.add(when: 'CONFIG_SEMIHOSTING', if_false: files('stubs-all.c'))
1
+stub_ss.add(files('stubs-all.c'))
2
user_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files(
3
'user.c',
4
'guestfd.c'))
@@ -8,12 +8,13 @@ system_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files(
8
'guestfd.c',
9
'uaccess.c',
10
'syscalls.c',
11
-), if_false: files(
11
+))
12
+stub_ss.add(files(
13
'stubs-system.c',
14
))
15
system_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING',
15
- if_true: files('arm-compat-semi.c'),
16
- if_false: files('arm-compat-semi-stub.c'))
16
+ if_true: files('arm-compat-semi.c'))
17
+stub_ss.add(files('arm-compat-semi-stub.c'))
18
19
specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_USER_ONLY'],
20
if_true: files('syscalls.c'))