mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
meson: merge hw_common_arch in target_common_system_arch
No need to keep two different libraries, as both are compiled with exact same flags. As well, rename target common libraries to common_{arch} and system_{arch}, to follow what exists for common and system libraries. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/20250521223414.248276-8-pierrick.bouvier@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d33717d7fc
commit
ddc25eb404
1 changed files with 12 additions and 21 deletions
33
meson.build
33
meson.build
|
@ -4101,7 +4101,6 @@ common_all = static_library('common',
|
|||
dependencies: common_ss.all_dependencies())
|
||||
|
||||
# construct common libraries per base architecture
|
||||
hw_common_arch_libs = {}
|
||||
target_common_arch_libs = {}
|
||||
target_common_system_arch_libs = {}
|
||||
foreach target_base_arch, config_base_arch : config_base_arch_mak
|
||||
|
@ -4130,22 +4129,10 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak
|
|||
target_c_args = ['-DCPU_DEFS_H']
|
||||
target_system_c_args = target_c_args + ['-DCOMPILING_SYSTEM_VS_USER', '-DCONFIG_SOFTMMU']
|
||||
|
||||
if target_base_arch in hw_common_arch
|
||||
src = hw_common_arch[target_base_arch]
|
||||
lib = static_library(
|
||||
'hw_' + target_base_arch,
|
||||
build_by_default: false,
|
||||
sources: src.all_sources() + genh,
|
||||
include_directories: inc,
|
||||
c_args: target_system_c_args,
|
||||
dependencies: src.all_dependencies() + common_deps + system_deps)
|
||||
hw_common_arch_libs += {target_base_arch: lib}
|
||||
endif
|
||||
|
||||
if target_base_arch in target_common_arch
|
||||
src = target_common_arch[target_base_arch]
|
||||
lib = static_library(
|
||||
'target_' + target_base_arch,
|
||||
'common_' + target_base_arch,
|
||||
build_by_default: false,
|
||||
sources: src.all_sources() + genh,
|
||||
include_directories: inc,
|
||||
|
@ -4155,10 +4142,20 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak
|
|||
target_common_arch_libs += {target_base_arch: lib}
|
||||
endif
|
||||
|
||||
# merge hw_common_arch in target_common_system_arch
|
||||
if target_base_arch in hw_common_arch
|
||||
hw_src = hw_common_arch[target_base_arch]
|
||||
if target_base_arch in target_common_system_arch
|
||||
target_common_system_arch[target_base_arch].add_all(hw_src)
|
||||
else
|
||||
target_common_system_arch += {target_base_arch: hw_src}
|
||||
endif
|
||||
endif
|
||||
|
||||
if target_base_arch in target_common_system_arch
|
||||
src = target_common_system_arch[target_base_arch]
|
||||
lib = static_library(
|
||||
'target_system_' + target_base_arch,
|
||||
'system_' + target_base_arch,
|
||||
build_by_default: false,
|
||||
sources: src.all_sources() + genh,
|
||||
include_directories: inc,
|
||||
|
@ -4351,12 +4348,6 @@ foreach target : target_dirs
|
|||
objects += libuser.extract_objects(src.sources())
|
||||
arch_deps += src.dependencies()
|
||||
endif
|
||||
if target_type == 'system' and target_base_arch in hw_common_arch_libs
|
||||
src = hw_common_arch[target_base_arch].apply(config_target, strict: false)
|
||||
lib = hw_common_arch_libs[target_base_arch]
|
||||
objects += lib.extract_objects(src.sources())
|
||||
arch_deps += src.dependencies()
|
||||
endif
|
||||
if target_type == 'system' and target_base_arch in target_common_system_arch_libs
|
||||
src = target_common_system_arch[target_base_arch].apply(config_target, strict: false)
|
||||
lib = target_common_system_arch_libs[target_base_arch]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue