diff mbox series

[RFC,3/4] hw/ppc: updated build rules to use new file

Message ID 20210422193131.22560-4-lucas.araujo@eldorado.org.br (mailing list archive)
State New, archived
Headers show
Series hw/ppc: remove call to tcg-only function | expand

Commit Message

Lucas Mateus Martins Araujo e Castro April 22, 2021, 7:31 p.m. UTC
Updated meson.build to compile spapr_hcall_tcg_stub.c instead of
spapr_hcall.c when disable-tcg option is used

Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
---
 hw/ppc/meson.build | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
index 218631c883..8b9b537c37 100644
--- a/hw/ppc/meson.build
+++ b/hw/ppc/meson.build
@@ -14,7 +14,6 @@  ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
   'spapr_caps.c',
   'spapr_vio.c',
   'spapr_events.c',
-  'spapr_hcall.c',
   'spapr_iommu.c',
   'spapr_rtas.c',
   'spapr_pci.c',
@@ -29,6 +28,15 @@  ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
   'spapr_numa.c',
   'pef.c',
 ))
+tcg_ss = ss.source_set()
+tcg_ss.add(when: 'CONFIG_TCG', if_true: files(
+  'spapr_hcall.c',
+), if_false: files(
+  'spapr_hcall_tcg_stub.c',
+))
+
+ppc_ss.add_all(when: 'CONFIG_PSERIES', if_true: tcg_ss)
+
 ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c'))
 ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_LINUX'], if_true: files(
   'spapr_pci_vfio.c',