Skip to content

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Options fixes :'( #14730

wants to merge 12 commits into from

Conversation

bonzini
Copy link
Collaborator

@bonzini bonzini commented Jun 20, 2025

At least the code becomes (mostly) simpler, as it's now able to handle toplevel and subproject options more uniformly.

Fixes: #14728
Fixes: #14729

@bonzini bonzini added this to the 1.8.3 milestone Jun 20, 2025
@bonzini bonzini added regression options Meson configuration options labels Jun 20, 2025
@bonzini bonzini force-pushed the fix14728-14729 branch 2 times, most recently from dc03bf4 to 9898df4 Compare June 20, 2025 11:28
@bonzini bonzini marked this pull request as ready for review June 20, 2025 11:28
@bonzini bonzini requested a review from jpakkane as a code owner June 20, 2025 11:28
@bonzini bonzini force-pushed the fix14728-14729 branch 2 times, most recently from a538c87 to 3399ea1 Compare June 20, 2025 11:45
Copy link
Contributor

@bgilbert bgilbert left a 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.

bonzini added 7 commits June 21, 2025 18:11
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]>
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]>
bonzini added 2 commits June 22, 2025 08:43
…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]>
@bonzini bonzini requested a review from mensinda as a code owner June 22, 2025 06:44
@bonzini bonzini requested a review from bgilbert June 22, 2025 06:59
@@ -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
Copy link
Contributor

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.

bonzini and others added 2 commits June 26, 2025 08:10
Co-authored-by: Benjamin Gilbert <[email protected]>
Co-authored-by: Benjamin Gilbert <[email protected]>
@bgilbert
Copy link
Contributor

Docs look good. Thanks for all the fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
options Meson configuration options regression
Projects
None yet
2 participants