diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-07 12:22:31 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-10 15:45:15 +0200 |
commit | 727bb5b477e66b6cd8a558bf2cdf9a666b914f27 (patch) | |
tree | 92b015f15079ad29679d49a2a914232c0e78cdb4 /meson.build | |
parent | 6bd92a7c62648eb37053ccc809c3cab7d7629584 (diff) |
meson: pick libfdt from common_ss when building target-specific files
Avoid having to list dependencies such as libfdt twice, both on common_ss
and specific_ss. Instead, just take all the dependencies in common_ss
and allow the target-specific libqemu-*.fa library to use them.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 83ae4347c7..ab1f44b25c 100644 --- a/meson.build +++ b/meson.build @@ -3867,15 +3867,23 @@ foreach target : target_dirs target_common = common_ss.apply(config_target, strict: false) objects = common_all.extract_objects(target_common.sources()) - deps = target_common.dependencies() + arch_deps += target_common.dependencies() target_specific = specific_ss.apply(config_target, strict: false) arch_srcs += target_specific.sources() arch_deps += target_specific.dependencies() + # allow using headers from the dependencies but do not include the sources, + # because this emulator only needs those in "objects". For external + # dependencies, the full dependency is included below in the executable. + lib_deps = [] + foreach dep : arch_deps + lib_deps += dep.partial_dependency(compile_args: true, includes: true) + endforeach + lib = static_library('qemu-' + target, sources: arch_srcs + genh, - dependencies: arch_deps, + dependencies: lib_deps, objects: objects, include_directories: target_inc, c_args: c_args, @@ -3923,7 +3931,7 @@ foreach target : target_dirs emulator = executable(exe_name, exe['sources'], install: true, c_args: c_args, - dependencies: arch_deps + deps + exe['dependencies'], + dependencies: arch_deps + exe['dependencies'], objects: lib.extract_all_objects(recursive: true), link_depends: [block_syms, qemu_syms], link_args: link_args, |