Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously, meson would only check if glib was part of
target.external_dependencies and add --target-glib appropriately. This
however had the downside of meson not adding --target-glib if glib was
included as a subproject, potentially breaking otherwise builds.
Instead of checking external_dependencies, check target.added_deps for
an occurrence of 'glib-2.0' and then pick the appropriate codepath
(either from the external dependency based on version_reqs or for the
internal dependency based on the actual version, potentially downgraded
to the latest release version)
Related-to: #14694
|
|
As is the case with most other methods, it must be overriden in
another compiler for it to have any use. Only the Swift compiler
uses this method at this time.
|
|
As of Swift 5.9, C++/Objective-C++ code can be mixed with Swift, and
C++ APIs can be imported to Swift. However, this must be explicitly
enabled, as it is disabled by default.
Xcode 15 introduces a new setting for this, so only set it on Xcode 15
and above.
|
|
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
|
|
Those were hidden, because the global options look at
subproject `None` rather than `''`.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
To the user, toplevel project options are the same as global options
because they are not prefixed by ":". So, even if we starting printing
toplevel project overrides, we want to keep project options outside of
that section. Then one would end up with:
...
Project options
---------------
Main project:
Subproject foo:
The "Main project" line is printed because '' is in self.all_subprojects,
but there is nothing below because project options have been printed before.
To fix this, print section names lazily, together with their first content
item.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: #14476
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
These options are never looked up except by "meson configure" and
introspection, because option values are taken from self.augments[]
instead.
Fixes: #14558
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
We're about to lower the priority of the default_options that were passed
to subproject() and dependency() below that of machine files and command
line options.
Whenever a static dependency is falling back to a subproject, however, do
not do that. It makes no sense to build a shared library in that case.
Another possibility however could be to just make it an error.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Thanks to several fixes applied between commit d37d649b0 ("Make all
Meson level options overridable per subproject.", 2025-02-13) and now,
OptionStore never gets a string key. Tighten the type of OptionDict,
and use it whenever possible.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The cmd_line_options dictionary is described as having OptionKey keys, so
make sure that cmd_the keys do have the correct type.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
self.project_options is set already a couple lines above.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
There is common logic hiding between project() and "meson configure": the
complication that the comment mentions for the "default_options" case
actually applies to "meson configure", to machine files, to command line
options and to project options. Reuse the same function in all four cases.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
They must be there when running re-configuring, because the backend cannot
be changed, but they can be pending on the first invocation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Starting with Meson 1.8.0, "meson configure" prints some options as
":foo" instead of "foo". Print the option as it was passed by the
user.
While at it, make errors more consistent and/or correct (e.g.
"Unknown option" instead of "Unknown options").
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Use the type that is produced by the converter, and fix the type for
methods_map which has a wrongly-placed bracket.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The converter in DEFAULT_OPTIONS makes a mapping from OptionKey to Python values,
so use the correct type.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Based on reports from the users, PGI compilers need an explicit "-o -"
on the command line to emit preprocessed output on stdout. Override
the methods in the PGICompiler mixin to add it when output goes to
stdout but not when output goes elsewhere.
Fixes: #13216
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Pointed out by Charles Brunet
|
|
Fixes https://github.com/mesonbuild/meson/issues/4668
|
|
It's needed on Darwin for the same reason it's needed on
generic UNIX. Darwin supports both LD_LIBRARY_PATH and
DYLD_LIBRARY_PATH, but the two are not quite equivalent [1],
so we set both.
[1] https://github.com/ffi/ffi/blob/29ad900a/lib/ffi/dynamic_library.rb#L40
|
|
Only support class-based dispatch, all objects have been
converted.
|
|
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>
|
|
Do not call update() and Enum.__hash__ a gazillion times; operators
are the same for every instance of the class. In order to access
the class, just mark the methods using a decorator and build
METHODS later using __init_subclass__.
Non-primitive objects are not converted yet to keep the patch small.
They are created a lot less than other objects, especially strings
and booleans.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Do not call update() and Enum.__hash__ a gazillion times; operators
are the same for every instance of the class. In order to access
the class for non-trivial operators, the operators are first marked
using a decorator, and then OPERATORS is built via __init_subclass__.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Do not call update() and Enum.__hash__ a gazillion times; trivial
operators are the same for every instance of the class.
Introduce the infrastructure to build the MRO-resolved operators (so
the outcome same as if one called super().__init__) for each subclass
of InterpreterObject.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
In preparation for moving them to the class, make the operator functions
binary. Adjust the lambdas for trivial operators, and store unbound
methods for non-trivial ones.
Note that this requires adding operators manually for every override,
even subclasses. It's decidedly ugly at this temporary stage; later
it will result in just an extra @InterpreterObject.operator decorator
on the subclasses.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Without this commit, the rewriter and the static introspection tool
crash if `meson.build` contains something like
```meson
if false
foo = not_defined
endif
```
or
```meson
if false
message(not_defined)
endif
```
While it could be argued, that you should not write stuff like this,
this used to raise a `MesonBugException`, which we have to fix.
Fixes #14667
|
|
gdbus-docgen supports reStructuredText output since 2.71.1 and markdown
since 2.75.2, allow to simply generate it.
|
|
cmake does preprocessing in a linear pass through the entire file
this allows recursive variable lookups which cannot be supported
by a basic regex implementation.
|
|
in cmake variables are pure strings with no minimal required length so
an empty string is a valid key and ${} needs to be handled accordingly.
|
|
just as with C defines cmakedefine supports a variable amount of
whitespace between the # symbol and the actual token.
|
|
|
|
|
|
This is required to make sure that the generated .gir file actually contains all
the information to be used dynamically.
Valac supports this argument since 0.29.3 released in 2015.
|
|
Actually take an override into account, ie:
```meson
library(
...
override_options : {'b_lto' : false},
)
```
|
|
|
|
The weird format is to minimize the diff in the next fixup patch.
|
|
Compilers are not ready at the time the backend is created. Do
not look at them until generate() runs.
Fixes: 4e9fac15d ("interpreter: add backend options before validating the command line options", 2025-05-16)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Compilers are not ready at the time the backend is created. Do
not look at them until generate() runs.
Fixes: 4e9fac15d ("interpreter: add backend options before validating the command line options", 2025-05-16)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
|
|
ELD is Qualcomm's open-source embedded linker.
https://github.com/qualcomm/eld
Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
|
|
When git is used with worktrees, `.git` will be a file containing a link
to the original repo. Currently, we say that this is not git because
`.git` isn't a directory.
|