aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-04-19 14:39:14 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2025-04-24 17:49:05 +0300
commit8fe6edfa4f8b6e64a19bbae471f37a2750023af6 (patch)
treecaf3e1f4651156c81f8f88d961141ea6252367e3 /mesonbuild
parent705a63fc3a95c3a6fdb9506e07b1fd5e5c0522e4 (diff)
downloadmeson-8fe6edfa4f8b6e64a19bbae471f37a2750023af6.zip
meson-8fe6edfa4f8b6e64a19bbae471f37a2750023af6.tar.gz
meson-8fe6edfa4f8b6e64a19bbae471f37a2750023af6.tar.bz2
options: subproject system options require the global ones
Because system options apply to all subprojects, they need to be present globally whenever a subproject needs them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/options.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py
index 2226e6b..62413b1 100644
--- a/mesonbuild/options.py
+++ b/mesonbuild/options.py
@@ -899,6 +899,12 @@ class OptionStore:
self.options[key] = valobj
pval = self.pending_options.pop(key, None)
+ if key.subproject:
+ proj_key = key.evolve(subproject=None)
+ self.add_system_option_internal(proj_key, valobj)
+ if pval is None:
+ pval = self.options[proj_key].value
+
if pval is not None:
self.set_option(key, pval)