diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-02 06:40:04 +0200 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-09-09 09:23:04 -0400 |
| commit | e0ea239397ab585c8490ca704b14ce2bf66ed7c4 (patch) | |
| tree | 2093dc60ddf4676990aa0ed2e5cb2549e340513a /mesonbuild | |
| parent | 6174a49522cb3d7b9f925d96ca68c390cb833594 (diff) | |
| download | meson-e0ea239397ab585c8490ca704b14ce2bf66ed7c4.tar.gz | |
msetup: not-found subprojects do not have known options
If a subproject had its SubprojectHolder created, but was disabled, its options were not
parsed; therefore the subproject should not be checked for unknown options.
Fixes: #14969
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/msetup.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 8d7dd0bbf..f1fa777d1 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -16,6 +16,7 @@ from .options import OptionKey if T.TYPE_CHECKING: from typing_extensions import Protocol from .coredata import SharedCMDOptions + from .interpreter import SubprojectHolder class CMDOptions(SharedCMDOptions, Protocol): @@ -192,9 +193,9 @@ class MesonApp: 'Some other Meson process is already using this build directory. Exiting.'): return self._generate(env, capture, vslite_ctx) - def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options: T.Dict[OptionKey, str], all_subprojects: T.Mapping[str, object]) -> None: + def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options: T.Dict[OptionKey, str], all_subprojects: T.Mapping[str, SubprojectHolder]) -> None: errlist: T.List[str] = [] - known_subprojects = all_subprojects.keys() + known_subprojects = [name for name, obj in all_subprojects.items() if obj.found()] for opt in cmd_line_options: # Accept options that exist or could appear in subsequent reconfigurations, # including options for subprojects that were not used |
