Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
It is impossible to detect the source of default_library=both from within the
test, so add yet another knob... :(
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>
|
|
The test covers overriding an option from the dependency() function.
If the same option is passed on the command line, it overrides the
dependency()'s default_options as well.
Tweak the description of the unittests that uses the same sources.
The tests pass, but I am not sure they should. For example in
the second test the default_library=both setting in the machine file
should have the same effect as the -D option (machine files have lower
priority than command line, but higher priority than anything in meson.build
files).
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>
|
|
Once unknown options will go through accept_as_pending_option, only system options
that really exist in Meson will be accepted. Adjust the unit tests.
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>
|
|
|
|
Windows 2019 in GH Actions goes away on the 30th.
|
|
This makes all the symbols searchable from the .devhelp file.
|
|
|
|
|
|
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>
|
|
|
|
Allows to browse the documentation offline.
|
|
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.
|
|
it uses the existing 14 configure file test case to configure
config 7 and 10 with cmake and meson and then compares the
relevant output to see if they are equal
|
|
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.
|
|
|
|
|
|
Which doesn't give helpful error messages unless used with pytest
|
|
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},
)
```
|
|
|