2023-05-23 09:22:36 +03:00
|
|
|
if not get_option('tcg').allowed()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-03-08 23:04:33 +03:00
|
|
|
tcg_ss = ss.source_set()
|
|
|
|
|
|
|
|
tcg_ss.add(files(
|
|
|
|
'optimize.c',
|
2021-03-10 01:24:14 +03:00
|
|
|
'region.c',
|
2021-03-08 23:04:33 +03:00
|
|
|
'tcg.c',
|
|
|
|
'tcg-common.c',
|
|
|
|
'tcg-op.c',
|
2023-05-15 09:13:46 +03:00
|
|
|
'tcg-op-ldst.c',
|
2021-03-08 23:04:33 +03:00
|
|
|
'tcg-op-gvec.c',
|
|
|
|
'tcg-op-vec.c',
|
|
|
|
))
|
2021-03-18 21:46:44 +03:00
|
|
|
|
|
|
|
if get_option('tcg_interpreter')
|
|
|
|
libffi = dependency('libffi', version: '>=3.0', required: true,
|
2022-07-14 15:56:58 +03:00
|
|
|
method: 'pkg-config')
|
2023-05-23 09:22:36 +03:00
|
|
|
tcg_ss.add(libffi)
|
|
|
|
tcg_ss.add(files('tci.c'))
|
2021-03-18 21:46:44 +03:00
|
|
|
endif
|
2021-03-08 23:04:33 +03:00
|
|
|
|
2023-05-23 09:22:36 +03:00
|
|
|
tcg_ss = tcg_ss.apply(config_host, strict: false)
|
|
|
|
|
|
|
|
libtcg_user = static_library('tcg_user',
|
|
|
|
tcg_ss.sources() + genh,
|
|
|
|
name_suffix: 'fa',
|
|
|
|
c_args: '-DCONFIG_USER_ONLY',
|
|
|
|
build_by_default: have_user)
|
|
|
|
|
|
|
|
tcg_user = declare_dependency(link_with: libtcg_user,
|
|
|
|
dependencies: tcg_ss.dependencies())
|
|
|
|
user_ss.add(tcg_user)
|
|
|
|
|
|
|
|
libtcg_softmmu = static_library('tcg_softmmu',
|
|
|
|
tcg_ss.sources() + genh,
|
|
|
|
name_suffix: 'fa',
|
|
|
|
c_args: '-DCONFIG_SOFTMMU',
|
|
|
|
build_by_default: have_system)
|
|
|
|
|
|
|
|
tcg_softmmu = declare_dependency(link_with: libtcg_softmmu,
|
|
|
|
dependencies: tcg_ss.dependencies())
|
|
|
|
softmmu_ss.add(tcg_softmmu)
|