summaryrefslogtreecommitdiff
path: root/mesonbuild/options.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-26 10:15:34 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-06-18 21:33:19 +0300
commit3317afe72da7798cbbefa55bf41f92f45e0fc91d (patch)
tree786ba1b4f3112ed9115c6be05198f54c8ecd95e9 /mesonbuild/options.py
parent7c3354a7f41036e828d5a83f274952bf54811906 (diff)
downloadmeson-3317afe72da7798cbbefa55bf41f92f45e0fc91d.tar.gz
options: accept backend options as pending on first invocation
They must be there when running re-configuring, because the backend cannot be changed, but they can be pending on the first invocation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/options.py')
-rw-r--r--mesonbuild/options.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py
index 1ef5087a5..e999c61ee 100644
--- a/mesonbuild/options.py
+++ b/mesonbuild/options.py
@@ -1362,7 +1362,8 @@ class OptionStore:
else:
self.pending_options[key] = valstr
- def accept_as_pending_option(self, key: OptionKey, known_subprojects: T.Optional[T.Union[T.Set[str], T.KeysView[str]]] = None) -> bool:
+ def accept_as_pending_option(self, key: OptionKey, known_subprojects: T.Optional[T.Union[T.Set[str], T.KeysView[str]]] = None,
+ first_invocation: bool = False) -> bool:
# Fail on unknown options that we can know must exist at this point in time.
# Subproject and compiler options are resolved later.
#
@@ -1373,6 +1374,8 @@ class OptionStore:
return True
if self.is_compiler_option(key):
return True
+ if first_invocation and self.is_backend_option(key):
+ return True
return (self.is_base_option(key) and
key.evolve(subproject=None, machine=MachineChoice.HOST) in COMPILER_BASE_OPTIONS)