xref: /openbmc/qemu/tcg/meson.build (revision 2f95279a)
1if not get_option('tcg').allowed()
2   subdir_done()
3endif
4
5tcg_ss = ss.source_set()
6
7tcg_ss.add(files(
8  'optimize.c',
9  'region.c',
10  'tcg.c',
11  'tcg-common.c',
12  'tcg-op.c',
13  'tcg-op-ldst.c',
14  'tcg-op-gvec.c',
15  'tcg-op-vec.c',
16))
17
18if get_option('tcg_interpreter')
19  libffi = dependency('libffi', version: '>=3.0', required: true,
20                      method: 'pkg-config')
21  tcg_ss.add(libffi)
22  tcg_ss.add(files('tci.c'))
23endif
24
25tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
26if host_os == 'linux'
27  tcg_ss.add(files('perf.c'))
28endif
29
30tcg_ss = tcg_ss.apply({})
31
32libtcg_user = static_library('tcg_user',
33                             tcg_ss.sources() + genh,
34                             name_suffix: 'fa',
35                             dependencies: tcg_ss.dependencies(),
36                             c_args: '-DCONFIG_USER_ONLY',
37                             build_by_default: false)
38
39tcg_user = declare_dependency(link_with: libtcg_user)
40user_ss.add(tcg_user)
41
42libtcg_system = static_library('tcg_system',
43                                tcg_ss.sources() + genh,
44                                name_suffix: 'fa',
45                                dependencies: tcg_ss.dependencies(),
46                                c_args: '-DCONFIG_SOFTMMU',
47                                build_by_default: false)
48
49tcg_system = declare_dependency(link_with: libtcg_system)
50system_ss.add(tcg_system)
51