If a file defining the binary TargetInfo structure is available, link with it. Otherwise keep using the stub.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> --- MAINTAINERS | 1 + meson.build | 9 ++++++++- configs/targets/meson.build | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 configs/targets/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 451e2778888..63cf1e6ed5b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1932,6 +1932,7 @@ M: Philippe Mathieu-Daudé <phi...@linaro.org> S: Supported F: include/qemu/target-info*.h F: target-info*.c +F: configs/targets/*.c Xtensa Machines --------------- diff --git a/meson.build b/meson.build index 32e6aeb295d..70ee7e838ed 100644 --- a/meson.build +++ b/meson.build @@ -3204,6 +3204,7 @@ config_devices_mak_list = [] config_devices_h = {} config_target_h = {} config_target_mak = {} +config_target_info = {} disassemblers = { 'alpha' : ['CONFIG_ALPHA_DIS'], @@ -3797,9 +3798,9 @@ specific_ss.add(files('page-target.c', 'page-vary-target.c')) common_ss.add(files('target-info.c')) system_ss.add(files('target-info-qom.c')) -specific_ss.add(files('target-info-stub.c')) subdir('backends') +subdir('configs/targets') subdir('disas') subdir('migration') subdir('monitor') @@ -4260,6 +4261,12 @@ foreach target : target_dirs arch_srcs += gdbstub_xml endif + if target in config_target_info + arch_srcs += config_target_info[target] + else + arch_srcs += files('target-info-stub.c') + endif + t = target_arch[target_base_arch].apply(config_target, strict: false) arch_srcs += t.sources() arch_deps += t.dependencies() diff --git a/configs/targets/meson.build b/configs/targets/meson.build new file mode 100644 index 00000000000..a9f6b24ec01 --- /dev/null +++ b/configs/targets/meson.build @@ -0,0 +1,4 @@ +foreach target : [ + ] + config_target_info += {target : files(target + '.c')} +endforeach -- 2.47.1