[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 84/84] tcg: Build once for system and once for user-only
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 84/84] tcg: Build once for system and once for user-only |
|
Date: |
Wed, 3 May 2023 08:23:31 +0100 |
Create two static libraries for use by each execution mode.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/meson.build | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/tcg/meson.build b/tcg/meson.build
index f56c465f4d..bbac401fbf 100644
--- a/tcg/meson.build
+++ b/tcg/meson.build
@@ -1,3 +1,7 @@
+if not get_option('tcg').allowed()
+ subdir_done()
+endif
+
tcg_ss = ss.source_set()
tcg_ss.add(files(
@@ -14,8 +18,28 @@ tcg_ss.add(files(
if get_option('tcg_interpreter')
libffi = dependency('libffi', version: '>=3.0', required: true,
method: 'pkg-config', kwargs: static_kwargs)
- specific_ss.add(libffi)
- specific_ss.add(files('tci.c'))
+ tcg_ss.add(libffi)
+ tcg_ss.add(files('tci.c'))
endif
-specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
+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)
--
2.34.1
- [PATCH 77/84] plugins: Move plugin_insn_append to translator.c, (continued)
- [PATCH 77/84] plugins: Move plugin_insn_append to translator.c, Richard Henderson, 2023/05/03
- [PATCH 78/84] plugins: Drop unused headers from exec/plugin-gen.h, Richard Henderson, 2023/05/03
- [PATCH 79/84] disas: Move disas.c to disas/, Richard Henderson, 2023/05/03
- [PATCH 83/84] exec/poison: Do not poison CONFIG_SOFTMMU, Richard Henderson, 2023/05/03
- Re: [PATCH 83/84] exec/poison: Do not poison CONFIG_SOFTMMU, Thomas Huth, 2023/05/08
[PATCH 84/84] tcg: Build once for system and once for user-only,
Richard Henderson <=
[PATCH 82/84] disas: Remove target-specific headers, Richard Henderson, 2023/05/03
[PATCH 80/84] disas: Remove target_ulong from the interface, Richard Henderson, 2023/05/03
[PATCH 81/84] tcg: Split out exec/user/guest-base.h, Richard Henderson, 2023/05/03
Re: [RESEND PATCH 00/84] tcg: Build once for system, once for user, Alex Bennée, 2023/05/11