| Age | Commit message (Collapse) | Author |
|
This allows us to simplify running mypy, as we can just mypy the entire
utils module regardless of the platform we're using. As an added bonus,
this means we open one less module.
|
|
If any dependency has "sources" in it, the file from the dependency might
end up in the rustc command line.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes #15019
|
|
Fixes #15054
|
|
- Split long expressions in () according to max line length
- Partly revert d028502 . Fixes #14935.
- Fixes #15032.
|
|
If a depedency includes object files, they have to be added to the doctest.
However, NinjaBackend was not running flatten_object_list on the doctest.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This reverts commit 9b1eb8b8ed434d1c2fdca0d8ac46b79c9b91bb0f.
It is not needed anymore since the pre-1.8 semantics were the
good ones.
Only leave in place the new and clearer testcase names.
|
|
This reverts commit 5ab871be5287aa5cce1e8dfdfb7c4a6b07b4f2f7.
It is not needed anymore since the pre-1.8 semantics were the
good ones.
|
|
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>
|
|
|
|
|
|
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
|
Can be tested with adding -stdlib=libc++ to C++ flags.
In file included from /usr/include/c++/v1/stdio.h:93:
In file included from /usr/include/c++/v1/__config:14:
In file included from /usr/include/c++/v1/__configuration/abi.h:15:
/usr/include/c++/v1/__configuration/platform.h:35:7: error: function-like macro '__has_include' is not defined
35 | # if __has_include(<features.h>)
| ^
/usr/include/c++/v1/__configuration/platform.h:48:5: error: function-like macro '__has_include' is not defined
48 | #if __has_include(<picolibc.h>)
| ^
1 warning and 2 errors generated.
'
|
|
|
|
Force multiline arguments when there is a trailing comma.
This is the behavior of muon.
Fixes #14721.
|
|
The test has a custom .h target that has the same name as the input in the
test's source directory. Sometimes a compiler could build a target that
intends to use the file in the source tree, but finds an incomplete
output of the custom_target, causing the test to fail.
To fix this, move the generated headers in a subdirectory of the build
tree.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The compiler and linker argument options are special and are only
added when the compiler is first discovered. Thus any project-specific
values in a child project will remain sitting in pending_options
after initialize_from_subproject_call; coredata needs to inform
the option store that they now exist.
Fixes: #14939
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
If the parent project has not enabled a language, the child project's
project-specific compiler option values are sitting in pending_options
after initialize_from_subproject_call, and the option store has to be
informed that they now exist.
Fixes: #14939
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Fix my misunderstanding of the code before commit aede231ef ("ninjabackend:
pass objects to generate_rust_target from non-Rust sources", 2025-07-29).
Object files were added by get_rust_compiler_deps_and_args() to both the
main target and the doctest command lines:
objs, od = self.flatten_object_list(target)
for o in objs:
args.append(f'-Clink-arg={o}')
deps.append(o)
therefore they now need to be passed as the final argument of
get_rust_compiler_deps_and_args() for both command lines as well.
Failure to do so causes problems building doctests when the main
target has objects as well.
Add a regression test as well.
Fixes: #14897
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes another problem with running "meson configure" on Mesa.
Related: #14840
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This reverts commit 651aede977179c5fe382744e3dd91ca8e01d050c.
This was most certainly not acceptable.
|
|
|
|
We might run into an assertion failure down the road, if we don't fail
here. Specifically
project('proj')
executable('bin', 'header.h')
will throw during the ninja generation.
|
|
Meson was running into an key lookup failure when evaluating the
following:
project('proj', 'c')
executable('bin', link_language: 'cpp')
and since 41eb18d also if the executable contained exclusively header
sources.
|
|
Fixes #14840
|
|
|
|
The introspection interpreter sometimes produces targets with no source
files; BuildTarget will then pick a random compiler, according to the
order in clink_langs.
According to the comment in sort_clink, clink_langs are supposed
to list languages from *lowest* to highest priority. However,
process_compilers_late() process clink_langs in straight order and
returns the first language; which is the one with lowest priority.
This became visible with the addition of Rust to clink_langs,
because Rust has limitation on the names of library targets, but
the bug existed before.
Fixes: e49f2f7283e1d9f18e2f5f54647c07287cd70339
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
A cargo package can build multiple crate types for the same library.
Using the same name in meson.override_dependency() fails.
[pbonzini: adjust documentation]
|
|
If main project finds a directory subprojects/foo with no corresponding
foo.wrap, it creates a dummy PackageDefinition for it. If we later find
a subproject that has foo.wrap, replace the dummy wrap with it.
This happens for example when wrap-redirect have been deleted. It also
happens for subprojects downloaded from some Cargo.lock which does not
create a wrap-redirect.
Avoid loading the same location twice, which can happen when preparing
cargo subprojects.
|
|
|
|
When giving a dependency object as requires, allow to use the dependency from a
subproject (that is an InternalDepdency).
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Commit eca1ac18dc1978b15b500c9f1710c05cb1ccc0ec (#14252) added support
for properly detecting the -Wno-vla-larger-than flag: a value must be
specified for its positive form (-Wvla-larger-than=N), or GCC will exit
with the error "missing argument to ‘-Walloc-size-larger-than=’".
There is a handful of other -Wno-* flags whose positive form act in the
same manner, but are not covered here:
* -Wno-alloc-size-larger-than (GCC >=7.1.0)
* -Wno-alloca-larger-than (GCC >=7.1.0)
* -Wno-frame-larger-than (GCC >=4.4.0)
* -Wno-stack-usage (GCC >=4.7.0)
Add logic to treat these in the same way.
Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
|
|
Dependencies should be able to provide headers in its sources, even tho
the target which uses the dependency may not use the language that
header is for.
A specific example is vala, where C and Vala dependencies share the same
name, so in meson they ought to share the same dependency object in
order to provide a Vala and/or C dependency depending on who is using
it. Doing so right now however fails, if the project of the dependency
user doesn't list vala in its used languages, even tho they might just
be interested in the C part of the dependency.
|
|
|
|
|
|
|
|
|
|
rustdoc does not support --print, and therefore the rpath argument corresponding
to the rust installation is not passed to doctests.
Forward anything that requires --print to the RustCompiler, thus fixing
doctests with a shared library dependency.
Fixes: #14813
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This allows users to do two things, flatten potentially nested arrays
themselves, and, to safely convert types that may be an array to not an
array.
```meson
x = [meson.get_external_property('may_be_array)].flatten()
```
```meson
x = ['a', ['b', 'c']]
assert(x.flatten() == ['a', 'b', 'c'])
```
|
|
Without adding .pxi` as a known header suffix, the added test will
fail with:
```
No specified compiler can handle file stuff.pxi
```
Technically only .pxd are header files, and .pxi are "include files"
which are literally included in .pyx files. Adding them as headers
seems to be fine though, since they're kinda similar and the point is
to avoid treating them as source files.
|
|
As an initial implementation, simply adding "-C prefer-dynamic" works
for binary crates (as well as dylib and proc-macro that already used it).
In the future this could be extended to other crate types. For more
information see the comment in the changed file, as well as
https://github.com/mesonbuild/meson/issues/8828 and
https://github.com/mesonbuild/meson/issues/14215.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: #14789
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Skip the hdf5 Fortran config-tool test when running on CI and h5fc looks
broken. This is needed due to upstream bug that h5fc does not include
include paths when built via CMake, that currently affects at least Arch
Linux and Gentoo.
Bug: https://github.com/HDFGroup/hdf5/issues/5660
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
|
Check that build options fall back to host options, and that they
can be retrieved with get_option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|