xref: /openbmc/qemu/tcg/meson.build (revision 62f182c9)
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                             dependencies: tcg_ss.dependencies(),
35                             c_args: '-DCONFIG_USER_ONLY',
36                             build_by_default: false)
37
38tcg_user = declare_dependency(objects: libtcg_user.extract_all_objects(recursive: false),
39                              dependencies: tcg_ss.dependencies())
40user_ss.add(tcg_user)
41
42libtcg_system = static_library('tcg_system',
43                                tcg_ss.sources() + genh,
44                                dependencies: tcg_ss.dependencies(),
45                                c_args: '-DCONFIG_SOFTMMU',
46                                build_by_default: false)
47
48tcg_system = declare_dependency(objects: libtcg_system.extract_all_objects(recursive: false),
49                                dependencies: tcg_ss.dependencies())
50system_ss.add(tcg_system)
51