[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 48/48] tcg: Build once for system and once for user-only
From: |
Richard Henderson |
Subject: |
[PATCH v3 48/48] tcg: Build once for system and once for user-only |
Date: |
Tue, 30 May 2023 21:03:30 -0700 |
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 bdc185a485..565c60bc96 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')
- 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
- Re: [PATCH v3 29/48] tcg: Remove NO_CPU_IO_DEFS, (continued)
- [PATCH v3 31/48] exec-all: Widen TranslationBlock pc and cs_base to 64-bits, Richard Henderson, 2023/05/31
- [PATCH v3 28/48] tcg: Split tcg/tcg-op-gvec.h, Richard Henderson, 2023/05/31
- [PATCH v3 27/48] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits, Richard Henderson, 2023/05/31
- [PATCH v3 33/48] include/exec: Remove CODE_GEN_AVG_BLOCK_SIZE, Richard Henderson, 2023/05/31
- [PATCH v3 34/48] accel/tcg: Move most of gen-icount.h into translator.c, Richard Henderson, 2023/05/31
- [PATCH v3 36/48] accel/tcg: Move translator_fake_ldb out of line, Richard Henderson, 2023/05/31
- [PATCH v3 38/48] target/mips: Tidy helpers for translation, Richard Henderson, 2023/05/31
- [PATCH v3 48/48] tcg: Build once for system and once for user-only,
Richard Henderson <=
- [PATCH v3 46/48] plugins: Drop unused headers from exec/plugin-gen.h, Richard Henderson, 2023/05/31
- [PATCH v3 40/48] *: Add missing includes of exec/exec-all.h, Richard Henderson, 2023/05/31
- [PATCH v3 41/48] accel/tcg: Tidy includes for translator.[ch], Richard Henderson, 2023/05/31
- [PATCH v3 43/48] tcg: Move env defines out of NEED_CPU_H in helper-head.h, Richard Henderson, 2023/05/31
- [PATCH v3 44/48] tcg: Remove target-specific headers from tcg.[ch], Richard Henderson, 2023/05/31
- [PATCH v3 47/48] exec/poison: Do not poison CONFIG_SOFTMMU, Richard Henderson, 2023/05/31
- [PATCH v3 42/48] tcg: Fix PAGE/PROT confusion, Richard Henderson, 2023/05/31