[1.12 regression] add_arguments not processed correctly for non-cross builds#16004
Open
bonzini wants to merge 8 commits into
Open
[1.12 regression] add_arguments not processed correctly for non-cross builds#16004bonzini wants to merge 8 commits into
bonzini wants to merge 8 commits into
Conversation
bonzini
force-pushed
the
qemu-machine-map
branch
5 times, most recently
from
July 14, 2026 09:45
84ee3c8 to
663e0d5
Compare
bonzini
marked this pull request as ready for review
July 14, 2026 09:45
bonzini
force-pushed
the
qemu-machine-map
branch
from
July 14, 2026 10:21
663e0d5 to
c088d60
Compare
Continue the job started by commit 687cb97 ("backends: use Build.get_project_args", 2026-01-16). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Make this more consistent with get_project_*args. Either way the arguments are only used together with a build target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Per-machine compiler arguments (whether global or project) are separated for "native: true" and "native: false" targets. This means that it is incorrect to simply drop them for "native: true" targets when not cross compiling. Instead, the BuildTarget needs to know the *original* value of native and use it to apply the correct set of arguments. Start by adding all the infrastructure and handling project arguments. Global arguments need more care; they are not yet fully fixed.
bonzini
force-pushed
the
qemu-machine-map
branch
from
July 14, 2026 11:18
c088d60 to
c1f7325
Compare
dblsaiko
approved these changes
Jul 14, 2026
dblsaiko
left a comment
Contributor
There was a problem hiding this comment.
Can confirm this fixes the original compilation failure. 🎉
Thank you for this and the original native subprojects patch set!
Reduced from QEMU. Reported-by: Katalin Rebhan <me@dblsaiko.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Per-machine compiler arguments (whether global or project) are separated for "native: true" and "native: false" targets. This means that it is incorrect to simply drop them for "native: true" targets when not cross compiling. For global arguments, the BuildTarget needs to whether "native: true" appeared in the *original* value of native as well as in any subproject call.
bonzini
force-pushed
the
qemu-machine-map
branch
from
July 15, 2026 07:44
c1f7325 to
0bc675d
Compare
Only apply machine map in the leaf functions, which are _dependency_method_impl and Interpreter.build_target. dependency_method was not applying it while extension_module_method was doing it too early (resulting in double application later in build_target). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
bonzini
force-pushed
the
qemu-machine-map
branch
from
July 15, 2026 08:12
0bc675d to
2b99628
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduced from QEMU.
The root cause of the issue is that
native: trueandnative: falseglobal_arguments and project_arguments are separate even when not cross-compiling. I didn't take that into account when writing the special case machine map code foradd_*_arguments.A separate problem (which I think was also present in @dcbaker's version) is that global arguments are resolved always with the toplevel Build object, because they are handled by the backend. This is fixed as well.