Age | Commit message (Collapse) | Author | Files | Lines |
|
When giving a dependency object as requires, allow to use the dependency from a
subproject (that is an InternalDepdency).
|
|
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
|
|
_gir_has_option runs g-ir-scanner --help | grep <option> to determine if
the current version of g-ir-scanner supports a particular option. This
already early exists if g-ir-scanner is a OverrideProgram, as it cannot
be executed if it is (technically OverridePrograms can actually be
executed during configure time, but not g-ir-scanner; as it depends on
native modules). Do the same in case g-ir-scanner is an executable (it
currently isn't but I might want to move it into one, as to avoid the
rule-dependency issue with the aforementioned native module)
|
|
This requires g-ir-scanner >=1.85.0, if this isn't the case we'll just
fail.
|
|
The --version argument was only added in g-ir-scanner 1.58, but the
bionic ci still uses g-ir-scanner 1.56. Don't fail if that is the case
and assume the version comparison is void.
|
|
There isn't really any point in doing this, given that it doesn't
provide any headers & libraries by itself and means projects that
conditionally build introspection behind a feature only need to check
for the existence of g-ir-scanner, not gobject-introspection-1.0
anymore.
|
|
|
|
|
|
In `run_meson_command_tests.py`.
Replace it with `pip install .` if `pip` is available.
Replace it with 'gpep517 install-from-source` if available.
Else keep the old behaviour.
Fixes #14522.
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Make generate_rust_target essentially a replacement from generate_link,
plus the actual generation of rustc compiler arguments. Remove
the parts (especially flatten_object_list and get_fortran_order_deps)
that generate_target already does, and add any objects files that
were produced by compiling non-Rust sources.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
rustc only needs to be a linker if there are any Rust-ABI dependencies.
Skip it whenever linking to a C-ABI dependency. This makes it possible
for Meson to pick 'rust' whenever it sees Rust sources, but not whenever
it sees Rust used by a dependency with "rust_abi: 'c'".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Ensure that mixed Rust/C executables compile the non-Rust translation
units with a compatible relocation model.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
together
Rust sources are not compiled separately: generation of the .a or .so
or binary happens at the same time as compilation. There is no separate
compilation phase where the .o file is created.
In preparation for moving generate_rust_target where generate_link is now,
make the compilation phase of generate_target skip them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Makes the code more similar to the earlier loop for generated sources.
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>
|
|
As we are becoming more popular, the docs have to be clearer because
we're being exposed to a wider base of users with highly variable
English language ability. Some of those can be helped with
translations, but for the rest, let's repeat ourselves.
Fixes https://github.com/mesonbuild/meson/issues/14843
|
|
Allows explicitly setting the Swift module name. By default, this is set
to the target name, which we might want to change for various reasons,
for example when it isn't a valid module name, or when building two
targets with the same module name (e.g. a host and native variant).
|
|
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.
|
|
|
|
|
|
|
|
|
|
This is required by meson-python to fix RPATH entries when building a wheel.
|
|
Currently the unittests are not runnable with pytest or unittest
without going through the run_unittests.py wrapper, or setting
certain env vars like MESON_UNIT_TEST_BACKEND.
This has that downside that the common "pytest ..." fails and integration
with things like VSCode fails too.
To work around that we set everything that is needed to run the tests
in __init__.py and run_unittests is only one more variant to invoke them
by providing different defaults and settings.
To make sure that pytest/unittest discover and run_unittests don't diverge
implement an automatic test discovery in run_unittests to avoid hardcoding
the tests to run there. There shouldn't be any functional changes.
|
|
When arrays were added they were called arrays. Because the are
implemented with Python lists, that language started leaking into
talking about Meson types. This is confusing. I've attempted, as much as
possible, to move to using one name, array. I picked array because 1)
It's the original name used, and 2) what Meson has are more properly
arrays as they have a fixed length, while a critical property of lists
are the ability to link and unlink them.
There are a couple of places where the list language has leaked into the
names of keyword arguments. I have not made any attempt to change those,
I don't know if it's that useful or not.
|
|
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>
|
|
Rust doctests implicitly use the base target as a crate. This is not
possible unless the target uses the Rust ABI.
If someone uses a C-ABI target with rust.doctest(), you get an unresolved
module error and it is not clear what's really going on, so add a more
specific error. Cargo does the same, though it only reports a warning.
Fixes: #14813
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
clang-tidy can't be ran as is on every source file and header
|
|
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'])
```
|
|
Build hotdoc from the git repository to work around the build failures
resulting from C99 incompatibilities. The issues are already fixed,
but the fix has not made it into a release yet.
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
|
Ensure that valobj.yielding is cleared for options in the toplevel project.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This works around an issue in which meson provides absolute paths to
rustc, but rustc pulls metadata from an external rlib and adds link args
without adding library paths.
Fixes: #14622
|
|
It is too old and barfs on patches from git-format-patch:
```
Applying diff file "orc-0.4.38\0001-meson-fix-symbols-leaking-from-static-library-on-Win.patch"
patching file meson.build
Assertation failed!
Program: C:\Strawberry\c\bin\patch.EXE
File: .\src\patch\2.5.9\patch-2.5.9-src\patch.c, Line 354
Expression: hunk
```
2.6.1 is the oldest known version that works correctly.
|
|
|
|
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.
|
|
Avoids errors like
`ERROR: Invalid variable name: 16bit_arithmetic_dir`.
|
|
`meson.py introspect build --targets` should show
`/path/to/project/hello.c` instead of
`/path/to/project/subdir/../hello.c` if
/path/to/project/meson.build contains subdir('subdir') and
/path/to/project/subdir/meson.build contains
executable('hello', '../hello.c').
|
|
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>
|
|
RustCompiler.build_rpath_args works by appending the directory to the
arguments computed by self.linker.build_rpath_args. This does not
work if there is no argument to begin with, which happens for example
in program crates.
Use the new extra_paths argument to force inclusion of the libdir into
the rpath of the binary, even in that case.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Allow adding extra directories to the rpath. Rust needs this when Rustup
is in use.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|