aboutsummaryrefslogtreecommitdiff
path: root/tcg/meson.build
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-03-18 12:46:44 -0600
committerRichard Henderson <richard.henderson@linaro.org>2021-06-19 08:51:11 -0700
commit22f15579fa1ca654d331cac8e68a4e70981a8801 (patch)
tree4455d1d60b899f48d6e50f19cd8f9237d5bf2569 /tcg/meson.build
parentfa52e660620fbb2418868e337aee06427ceafdbb (diff)
tcg: Build ffi data structures for helpers
Add libffi as a build requirement for TCI. Add libffi to the dockerfiles to satisfy that requirement. Construct an ffi_cif structure for each unique typemask. Record the result in a separate hash table for later lookup; this allows helper_table to stay const. Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/meson.build')
-rw-r--r--tcg/meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/tcg/meson.build b/tcg/meson.build
index 5be3915529..c4c63b19d4 100644
--- a/tcg/meson.build
+++ b/tcg/meson.build
@@ -9,6 +9,12 @@ tcg_ss.add(files(
'tcg-op-gvec.c',
'tcg-op-vec.c',
))
-tcg_ss.add(when: 'CONFIG_TCG_INTERPRETER', if_true: files('tci.c'))
+
+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'))
+endif
specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)