| Age | Commit message (Collapse) | Author |
|
Comparing the implementation of build_subdir with
https://github.com/mesonbuild/meson/pull/12258, both of them introduced
a similar separation between srcdir and builddir. There were some
differences in the choices of srcdir vs builddir; this commit tries to
identify which are bugs in which implementation, and get the best of
both worlds.
|
|
|
|
The Rust compiler will need these to check the rust_nightly option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
This allows us to check that all of the keyword arguments are of the
correct type.
|
|
This reverts https://github.com/mesonbuild/meson/pull/15107
Explicit objections regarding the design were raised and not answered,
so it shouldn't have been merged. It needs to be discussed and
revisited.
|
|
|
|
|
|
There are a lot of spelled out unions for these types, lets reduce that
number
|
|
The two methods are identical.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
This reverts commit 5e627c9b421a4cebb0e112af6a432fec66640c28.
|
|
g-ir-scanner is a pair of Python script + pymod, and the latter must be
available at any time the script is executed. The changes in the below
commit removed the ordering guarantee, breaking GStreamer introspection
building on Windows when using the monorepo.
This reverts commit ab57be75148c2faac67dba7877167772410ca5ef.
Fixes #14908
|
|
It is more logical, since those functions depend on a build target,
and do not require anything specific to the backend.
Furthermore, it will allow us to call determine_rpath_dirs from the
linker in a following commit, without the need to depend on the backend.
|
|
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.
|
|
I ran into GStreamer's CI being overwhelmed by a 5k long command line to
g-ir-scanner. This will help bypass the limitation.
See https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/532
See #6710
|
|
gdbus-docgen supports reStructuredText output since 2.71.1 and markdown
since 2.75.2, allow to simply generate it.
|
|
The CFLAGS environment variable is used for g-ir-scanner's linking pass,
It is emptied since commit 237513dff ("modules/gnome, modules/Python:
Allow injecting RPATH flags through LDFLAGS if needed", 2025-04-09);
which could even be considered a bugfix if it didn't break Fedora
quite badly.
I could not write a testcase, but the culprit seems to be the
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 that Fedora places
in CFLAGS. The file contains
*cc1_options:
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
and the lack of -fPIE option upsets the linker. Fix by priming
the contents of the CFLAGS variable with the c_link_args being used
for the build.
Fixes: #14631
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Append to scan_env_ldflags instead of overwriting it.
Fixes: #14631
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes #6710
|
|
if needed
Fixes communicating the RPATH to g-i-scanner in macOS.
See #14169
|
|
This is an old method, that is now just a wrapper around the OptionStore
method, that doesn't add any value. It's also an option related method
attached to the CoreData instead of the OptionStore, so useless and a
layering violation.
|
|
In the preceding commit we have started to perform compiler checks for
the value of `b_sanitize`, which allows us to detect sanitizers that
aren't supported by the compiler toolchain. But we haven't yet loosened
the option itself to accept arbitrary values, so until now it's still
only possible to pass sanitizer combinations known by Meson, which is
quite restrictive.
Lift that restriction by adapting the `b_sanitize` option to become a
free-form array. Like this, users can pass whatever combination of
comma-separated sanitizers to Meson, which will then figure out whether
that combination is supported via the compiler checks. This lifts a
couple of restrictions and makes the supporting infrastructure way more
future proof.
A couple of notes regarding backwards compatibility:
- All previous values of `b_sanitize` will remain valid as the syntax
for free-form array values and valid combo choices is the same. We
also treat 'none' specially so that we know to convert it into an
empty array.
- Even though the option has been converted into a free-form array,
callers of `get_option('b_sanitize')` continue to get a string as
value. We may eventually want to introduce a kwarg to alter this
behaviour, but for now it is expected to be good enough for most use
cases.
Fixes #8283
Fixes #7761
Fixes #5154
Fixes #1582
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
Add the support for the doc-format argument if g-ir-scanner supports it.
Ignore the argument otherwise as this is a no-op in such cases.
|
|
|
|
In cases, when localized media files are provided by some languages,
we need to use 'gnome.yelp ()' with 'symlink_media: false' which
copies all files from 'C' locale in addition to the localized
media. This wastes storage space. The alternative is to use
'symlink_media: true' which symlinks entirely to 'C' media files
ignoring localized media files.
As a middle ground, if the localized media file exists in the source
tree for a language, we use that file rather than symlinking to 'C'
media with the same filename even when 'symlink_media: true'. This
saves storage space.
If there are no localized media files in non-C language, the existing
behaviour is maintained.
|
|
Since they do not implement a default install dir like BuildTargets do.
gnome.compile_resources() would result in an unhandled python exception
when missing install_dir argument together with providing following arguments:
gresource_bundle: true
install: true
closes: https://github.com/mesonbuild/meson/issues/13447
Signed-off-by: RaviRahar <ravirahar33@gmail.com>
|
|
|
|
|
|
|
|
conditional
We do:
```
if is_thing:
assignme = value
if_is_thing:
...
else:
assignme = []
```
It is always defined on both sides, but there was no particular reason
we had to assign it in the later copy. pylint reported it as a false
positive, and it may prove confusing in general, and it's harmless to
move, so do so.
|
|
No need to spam about reading the input file.
Fixes: #13119
|
|
Commit 83facb39593fbfa4d9cd68e86f5f56f86f1fe1eb switched to using
`textwrap.dedent` for the code templates for `gnome.mkenums_simple`.
That changed indentation, however, making the generated code harder to
understand.
We improve this by properly indenting the multiline strings before
dedenting them. For optional parameters `decl_decorator` and
`header_prefix`, we add a newline if they are set to keep separation
between generated code blocks.
|
|
* Vala: depend on gresources
Valac uses gresource at compile time to look up .ui files
* Automatically pass `--gresourcesdir` to valac
* gnome.compile_resources: clean up duplicate paths better
* Add a test for improved gresouce handling
|
|
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
|
|
Since that's what this actually is.
|
|
|
|
It was generating #include with the basename of every header file. That
assumes that every directory where there are headers are also included
into search path when compiling the .c file.
Change to use path relative to current subdir, which can be both in
build or source directory. That means that we assume that when the .c
file is compiled, the target has a include_directories pointing to the
directory where gnome.mkenum_simple() has been called, which is
generally '.' and added automatically.
Also fix type annotation to only allow str and File sources, other types
have never been working, it would require to iterate over custom target
outputs, etc.
Fixes: #7582
|
|
It was not always using the pkg-config file.
|
|
gtkdoc() and generate_gir() methods assumes there is a C compiler, but
pure C++ projects might not add it explicitly.
Fixes: #12162
|
|
Allow modules using CustomTarget to modify the command description used by ninja backend. This result in more precise logs when building a project.
|
|
This makes the code cleaner and will allow to have other implementations
in the future.
|
|
We already import a bunch of objects directly from ..build but don't use
them nearly as much as we can. This resulted both in longer lines and s
minor performance difference since python has to resolve the name
binding the long way. There's no reason not to rewrite these names to
use the direct imports.
Found while investigating the fact that Executable was imported but
never used. It's easier to just use it.
|
|
This detects cases where module A imports a function from B, and C
imports that same function from A instead of B. It's not part of the API
contract of A, and causes innocent refactoring to break things.
|
|
|