accel/tcg: Use libuser_ss and libsystem_ss

While some of these files are built exactly once, due
to being in only libuser_ss or libsystem_ss, some of
the includes that they depend on require CONFIG_USER_ONLY.
So make use of the common infrastructure to allow that.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-03-12 14:55:21 -07:00
parent 7ed79a9adb
commit 1a1567b174

View file

@ -1,12 +1,21 @@
common_ss.add(when: 'CONFIG_TCG', if_true: files(
if not get_option('tcg').allowed()
subdir_done()
endif
tcg_ss = ss.source_set()
tcg_ss.add(files(
'cpu-exec-common.c',
'tcg-runtime.c',
'tcg-runtime-gvec.c',
))
if get_option('plugins')
common_ss.add(when: 'CONFIG_TCG', if_true: files('plugin-gen.c'))
tcg_ss.add(files('plugin-gen.c'))
endif
libuser_ss.add_all(tcg_ss)
libsystem_ss.add_all(tcg_ss)
tcg_specific_ss = ss.source_set()
tcg_specific_ss.add(files(
'tcg-all.c',
@ -22,11 +31,11 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
'cputlb.c',
))
user_ss.add(when: ['CONFIG_TCG'], if_true: files(
libuser_ss.add(files(
'user-exec-stub.c',
))
system_ss.add(when: ['CONFIG_TCG'], if_true: files(
libsystem_ss.add(files(
'icount-common.c',
'monitor.c',
'tcg-accel-ops.c',