2023-05-23 08:22:36 +02:00
|
|
|
if not get_option('tcg').allowed()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-03-08 21:04:33 +01:00
|
|
|
tcg_ss = ss.source_set()
|
|
|
|
|
|
|
|
tcg_ss.add(files(
|
|
|
|
'optimize.c',
|
2021-03-09 23:24:14 +01:00
|
|
|
'region.c',
|
2021-03-08 21:04:33 +01:00
|
|
|
'tcg.c',
|
|
|
|
'tcg-common.c',
|
|
|
|
'tcg-op.c',
|
2023-05-15 08:13:46 +02:00
|
|
|
'tcg-op-ldst.c',
|
2021-03-08 21:04:33 +01:00
|
|
|
'tcg-op-gvec.c',
|
|
|
|
'tcg-op-vec.c',
|
|
|
|
))
|
2021-03-18 19:46:44 +01:00
|
|
|
|
|
|
|
if get_option('tcg_interpreter')
|
|
|
|
libffi = dependency('libffi', version: '>=3.0', required: true,
|
2022-07-14 14:56:58 +02:00
|
|
|
method: 'pkg-config')
|
2023-05-23 08:22:36 +02:00
|
|
|
tcg_ss.add(libffi)
|
|
|
|
tcg_ss.add(files('tci.c'))
|
2021-03-18 19:46:44 +01:00
|
|
|
endif
|
2021-03-08 21:04:33 +01:00
|
|
|
|
2024-01-25 06:46:30 +01:00
|
|
|
tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
|
|
|
|
if host_os == 'linux'
|
|
|
|
tcg_ss.add(files('perf.c'))
|
|
|
|
endif
|
|
|
|
|
2023-08-30 11:52:43 +02:00
|
|
|
tcg_ss = tcg_ss.apply({})
|
2023-05-23 08:22:36 +02:00
|
|
|
|
|
|
|
libtcg_user = static_library('tcg_user',
|
|
|
|
tcg_ss.sources() + genh,
|
|
|
|
name_suffix: 'fa',
|
|
|
|
c_args: '-DCONFIG_USER_ONLY',
|
2023-09-27 15:48:31 +02:00
|
|
|
build_by_default: false)
|
2023-05-23 08:22:36 +02:00
|
|
|
|
|
|
|
tcg_user = declare_dependency(link_with: libtcg_user,
|
|
|
|
dependencies: tcg_ss.dependencies())
|
|
|
|
user_ss.add(tcg_user)
|
|
|
|
|
2023-10-04 11:06:20 +02:00
|
|
|
libtcg_system = static_library('tcg_system',
|
2023-05-23 08:22:36 +02:00
|
|
|
tcg_ss.sources() + genh,
|
|
|
|
name_suffix: 'fa',
|
|
|
|
c_args: '-DCONFIG_SOFTMMU',
|
2023-09-27 15:48:31 +02:00
|
|
|
build_by_default: false)
|
2023-05-23 08:22:36 +02:00
|
|
|
|
2023-10-04 11:06:20 +02:00
|
|
|
tcg_system = declare_dependency(link_with: libtcg_system,
|
2023-05-23 08:22:36 +02:00
|
|
|
dependencies: tcg_ss.dependencies())
|
2023-10-04 11:06:20 +02:00
|
|
|
system_ss.add(tcg_system)
|