-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Options fixes :'( #14730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Options fixes :'( #14730
Conversation
dc03bf4
to
9898df4
Compare
a538c87
to
3399ea1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the docs for the project()
default_options
argument there's also some out-of-date language about which options can be used in subprojects.
As shown in the test, "-Dtests=true" should not override the subproject() call because tests is a project options and those do not share a namespace. Fixes: mesonbuild#14728 Signed-off-by: Paolo Bonzini <[email protected]>
Remove knowledge of the internal pending_options from msetup; operate on the command line and check against the option store. Signed-off-by: Paolo Bonzini <[email protected]>
Reserve pending_options for those that could appear later in the configuration process. Options are added there only if accept_as_pending_option() is true. This is a preparation for changing the code so that it checks pending_options for subprojects as well. Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Fixes: 8dcc9d3 ("options: accept compiler and built-in options in --reconfigure and "meson configure"", 2025-05-21 Signed-off-by: Paolo Bonzini <[email protected]>
Remove all the special casing and late validation now that early augments are stored in pending_options until the subproject is found. As a result, this makes the buildtype special case operate on subprojects as well. It also simplifies set_from_configure_command(), which does not have to treat various kinds of options in different ways. Fixes: mesonbuild#14729 Signed-off-by: Paolo Bonzini <[email protected]>
Restore behavior of 1.7. Signed-off-by: Paolo Bonzini <[email protected]>
…by subproject This is already done most of the time for default_library but not in these cases. Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
docs/yaml/functions/project.yaml
Outdated
@@ -56,6 +54,10 @@ kwargs: | |||
|
|||
*(since 1.2.0)*: A dictionary may now be passed. | |||
|
|||
*(since 1.8.0): all global options, such as `buildtype`, are taken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all global options
is too strong, given the other changes.
Signed-off-by: Paolo Bonzini <[email protected]>
Co-authored-by: Benjamin Gilbert <[email protected]>
Co-authored-by: Benjamin Gilbert <[email protected]>
Docs look good. Thanks for all the fixes! |
At least the code becomes (mostly) simpler, as it's now able to handle toplevel and subproject options more uniformly.
Fixes: #14728
Fixes: #14729