aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-08-31 11:18:24 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-12-31 09:11:28 +0100
commit0d66549cf5b76bde9870af0d09a46d6d6c306e53 (patch)
tree33854f8d7b6a2d8f524e448e22db7ce21fd197c8 /meson.build
parent1220f5813a7e1c4ff9cf7ffa189f979be3801044 (diff)
meson: remove CONFIG_ALL
CONFIG_ALL is tricky to use and was ported over to Meson from the recursive processing of Makefile variables. Meson sourcesets however have all_sources() and all_dependencies() methods that remove the need for it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build32
1 files changed, 7 insertions, 25 deletions
diff --git a/meson.build b/meson.build
index 7aa06dc7c1..6e5a8a5b48 100644
--- a/meson.build
+++ b/meson.build
@@ -2888,7 +2888,6 @@ minikconf = find_program('scripts/minikconf.py')
config_all = {}
config_all_devices = {}
-config_all_disas = {}
config_devices_mak_list = []
config_devices_h = {}
config_target_h = {}
@@ -3014,7 +3013,6 @@ foreach target : target_dirs
if host_arch.startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
foreach sym: v
config_target += { sym: 'y' }
- config_all_disas += { sym: 'y' }
endforeach
endif
endforeach
@@ -3073,24 +3071,6 @@ foreach target : target_dirs
endforeach
target_dirs = actual_target_dirs
-# This configuration is used to build files that are shared by
-# multiple binaries, and then extracted out of the "common"
-# static_library target.
-#
-# We do not use all_sources()/all_dependencies(), because it would
-# build literally all source files, including devices only used by
-# targets that are not built for this compilation. The CONFIG_ALL
-# pseudo symbol replaces it.
-
-config_all += config_all_devices
-config_all += config_all_disas
-config_all += {
- 'CONFIG_XEN': xen.found(),
- 'CONFIG_SYSTEM_ONLY': have_system,
- 'CONFIG_USER_ONLY': have_user,
- 'CONFIG_ALL': true,
-}
-
target_configs_h = []
foreach target: target_dirs
target_configs_h += config_target_h[target]
@@ -3556,7 +3536,7 @@ foreach d, list : modules
foreach m, module_ss : list
if enable_modules
- module_ss = module_ss.apply(config_all, strict: false)
+ module_ss = module_ss.apply(config_all_devices, strict: false)
sl = static_library(d + '-' + m, [genh, module_ss.sources()],
dependencies: [modulecommon, module_ss.dependencies()], pic: true)
if d == 'block'
@@ -3751,13 +3731,15 @@ common_ss.add(qom, qemuutil)
common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss])
common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss)
-common_all = common_ss.apply(config_all, strict: false)
+# Note that this library is never used directly (only through extract_objects)
+# and is not built by default; therefore, source files not used by the build
+# configuration will be in build.ninja, but are never built by default.
common_all = static_library('common',
build_by_default: false,
- sources: common_all.sources() + genh,
+ sources: common_ss.all_sources() + genh,
include_directories: common_user_inc,
implicit_include_directories: false,
- dependencies: common_all.dependencies(),
+ dependencies: common_ss.all_dependencies(),
name_suffix: 'fa')
feature_to_c = find_program('scripts/feature_to_c.py')
@@ -4230,7 +4212,7 @@ if have_system
if xen.found()
summary_info += {'xen ctrl version': xen.version()}
endif
- summary_info += {'Xen emulation': config_all.has_key('CONFIG_XEN_EMU')}
+ summary_info += {'Xen emulation': config_all_devices.has_key('CONFIG_XEN_EMU')}
endif
summary_info += {'TCG support': config_all.has_key('CONFIG_TCG')}
if config_all.has_key('CONFIG_TCG')