xref: /qemu/target/s390x/meson.build (revision 72ffb631)
1s390x_ss = ss.source_set()
2s390x_ss.add(files(
3  'cpu.c',
4  'cpu_features.c',
5  'cpu_models.c',
6  'gdbstub.c',
7  'helper.c',
8  'interrupt.c',
9))
10
11s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
12
13gen_features = executable('gen-features', 'gen-features.c', native: true,
14                          build_by_default: false)
15
16gen_features_h = custom_target('gen-features.h',
17                               output: 'gen-features.h',
18                               capture: true,
19                               command: gen_features)
20
21s390x_ss.add(gen_features_h)
22
23s390x_softmmu_ss = ss.source_set()
24s390x_softmmu_ss.add(files(
25  'arch_dump.c',
26  'diag.c',
27  'ioinst.c',
28  'machine.c',
29  'mmu_helper.c',
30  'sigp.c',
31  'cpu-sysemu.c',
32))
33
34# Newer kernels on s390 check for an S390_PGSTE program header and
35# enable the pgste page table extensions in that case. This makes
36# the vm.allocate_pgste sysctl unnecessary. We enable this program
37# header if
38#  - we build on s390x
39#  - we build the system emulation for s390x (qemu-system-s390x)
40#  - KVM is enabled
41#  - the linker supports --s390-pgste
42if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste')
43  s390x_softmmu_ss.add(when: 'CONFIG_KVM',
44                       if_true: declare_dependency(link_args: ['-Wl,--s390-pgste']))
45endif
46
47s390x_user_ss = ss.source_set()
48
49subdir('tcg')
50
51target_arch += {'s390x': s390x_ss}
52target_softmmu_arch += {'s390x': s390x_softmmu_ss}
53target_user_arch += {'s390x': s390x_user_ss}
54