Skip to content

A PR fixing many small bugs#15585

Open
bonzini wants to merge 14 commits intomesonbuild:masterfrom
bonzini:papercuts
Open

A PR fixing many small bugs#15585
bonzini wants to merge 14 commits intomesonbuild:masterfrom
bonzini:papercuts

Conversation

@bonzini
Copy link
Contributor

@bonzini bonzini commented Feb 25, 2026

All of these should be relatively easy to review. The bugs are all pretty simple, but for most of them I don't have easy testcases.

Fixes: #9744
Fixes: #9727
Fixes: #8412
Fixes: #7811
Fixes: #6960
Fixes: #1633
Fixes: #15500
Fixes: #14113
Fixes: #13322
Fixes: #11318
Fixes: #11236

@bonzini bonzini changed the title A draft PR fixing many small bugs A PR fixing many small bugs Feb 25, 2026
@bonzini bonzini marked this pull request as ready for review February 25, 2026 16:30
@bonzini bonzini modified the milestones: 1.11, 1.12 Feb 25, 2026
@bonzini bonzini force-pushed the papercuts branch 2 times, most recently from c3da813 to e7727db Compare March 4, 2026 11:36
@thesamesam
Copy link
Member

0d4314d looks good. Can you cherry-pick that one? I can review some (but not all) of the others at another time.

Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some small nits for patches 1-2, but with those addressed they're r-b

Patch 3 is r-b

I haven't gotten past that yet.

bonzini added 14 commits March 12, 2026 16:25
For the --system-information case try multiple generators as
done in dependencies/cmake.py.  Then, when actually running
cmake pass -DCMAKE_MAKE_PROGRAM so that cmake and meson's
ninja are consistent.

Fixes: mesonbuild#11236
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The type check fix in _BASE_LANG_KW is all that's needed since
__convert_file_args already handles File objects correctly (converts
to path string + adds to depend_files for rebuild tracking). In fact,
the vala_args case 569 already had (str, File).  This just brings
the other languages in line.

Fixes: mesonbuild#1633
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: mesonbuild#11318
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
An executable in a subdirectory does not result in a forbidden target
name, allow it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
gui_app is consumed by the interpreter and never reaches build.py,
so remove it from buildtarget_kwargs entirely and add it to
a new interpreter-specific known_exe_kwargs.  To ensure that the
interpreter can process gui_app before the kwargs filter drops it,
delay filtering to just before the target constructor call.

win_subsystem is also executable-specific, so move it to known_exe_kwargs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
When both_libraries() reuses object files from the shared library
for the static library via ExtractedObjects, the object filenames
must match those produced for the shared library. For non-built vala
source files in subdirectories, object_filename_from_source() was
using os.path.basename() which dropped the subdirectory component,
while the actual compilation preserved it.

Use os.path.relpath() against the target's source directory instead,
matching the logic in generate_vala_compile().

Fixes: mesonbuild#6960
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: mesonbuild#8412
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Use -nostdinc++ and -nostdlib++ just like in CPPCompiler.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
…tion

When guess_win_linker() is called with invoked_directly=True (e.g. for
lld-link detection from clang-cl), and the user has specified a full
path to the linker via a native or cross file, the full path is only
used for the second Popen_safe call. The first call uses the bare
command name (e.g. 'lld-link'), which can fail with FileNotFoundError
if the linker wasn't on PATH.

Move the compiler = value assignment before the first Popen_safe call so
the configured full path is used immediately, and merge the intermediate
conditional.

Fixes: mesonbuild#9727
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
When I pass an executable on PATH to SCANBUILD environment variable it fails:

  Could not execute scan-build ""

Using shutil.which looks up bare names like scan-build in PATH and,
on Windows, automatically checks executable extensions.

Fixes: mesonbuild#9744
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
If the link_language is not one of the languages used to compile the
sources, using target.compilers results in a KeyError.

Fixes: mesonbuild#14113
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The TAP 14 spec says that "A command-line test runner might
exit with a non-zero status code" to "indicate failure to the
user in whatever means are appropriate".  Only force the ERROR
test case if the result was OK or EXPECTEDFAIL.

Fixes: mesonbuild#7811
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
 Meson gives an erroneous warning about the output file for configure_file() being overwritten if multiple configure_file() calls are being made from the same directory with the same output file name, but different build_subdir settings. In this case, the output files are not being overwritten because they are being created in different subdirectories.

The output also does not include the build_subdir:

Configuring file using configuration
WARNING: Output file "file" for configure_file() at meson.build:4 overwrites configure_file() output at meson.build:4
Configuring file using configuration

Now:

Configuring hello/file using configuration
Configuring world/file using configuration

Fixes: mesonbuild#15500
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
After the maximum number of failures is reached, any running test is
canceled. However in this case the partial output of the test might not
be a symptom of a hung test in the same way as it is after CTRL-C, so
hide it.

Fixes: mesonbuild#13322
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment