diff mbox series

[07/29] tcg/module: move files to module [target/i386/tcg]

Message ID 20210831121545.2874233-8-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series build more i386 tcg code modular. | expand

Commit Message

Gerd Hoffmann Aug. 31, 2021, 12:15 p.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 target/i386/tcg/meson.build        | 9 +++++++--
 target/i386/tcg/sysemu/meson.build | 5 ++++-
 2 files changed, 11 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/target/i386/tcg/meson.build b/target/i386/tcg/meson.build
index f9110e890c8a..7bbe3d926975 100644
--- a/target/i386/tcg/meson.build
+++ b/target/i386/tcg/meson.build
@@ -1,4 +1,7 @@ 
-i386_ss.add(when: 'CONFIG_TCG', if_true: files(
+i386_softmmu_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
+
+files_ss = ss.source_set()
+files_ss.add(when: 'CONFIG_TCG', if_true: files(
   'bpt_helper.c',
   'cc_helper.c',
   'excp_helper.c',
@@ -9,7 +12,9 @@  i386_ss.add(when: 'CONFIG_TCG', if_true: files(
   'mpx_helper.c',
   'seg_helper.c',
   'tcg-cpu.c',
-  'translate.c'), if_false: files('tcg-stub.c'))
+  'translate.c'))
+tcg_module_ss.add_all(when: 'TARGET_I386', if_true: files_ss)
+tcg_module_ss.add_all(when: 'TARGET_X86_64', if_true: files_ss)
 
 subdir('sysemu')
 subdir('user')
diff --git a/target/i386/tcg/sysemu/meson.build b/target/i386/tcg/sysemu/meson.build
index 2e444e766a5b..50bfd5094787 100644
--- a/target/i386/tcg/sysemu/meson.build
+++ b/target/i386/tcg/sysemu/meson.build
@@ -1,4 +1,5 @@ 
-i386_softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_SOFTMMU'], if_true: files(
+files_ss = ss.source_set()
+files_ss.add(when: ['CONFIG_TCG', 'CONFIG_SOFTMMU'], if_true: files(
   'tcg-cpu.c',
   'smm_helper.c',
   'excp_helper.c',
@@ -8,3 +9,5 @@  i386_softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_SOFTMMU'], if_true: files(
   'svm_helper.c',
   'seg_helper.c',
 ))
+tcg_module_ss.add_all(when: 'TARGET_I386', if_true: files_ss)
+tcg_module_ss.add_all(when: 'TARGET_X86_64', if_true: files_ss)