So that we can actually use it anyplace that an OptionDictType could be
used. I've also done a bit optimizing/simplifying of the implementation.
This is needed for cuda, as it returns an OptionOverrideProxy where we
ask for an OptionDicType
Add the ids of any target that needs to be rebuilt before running the
tests as computed by the backend, to the introspection data for tests and benchmarks.
This also includes anything that appears on the test's command line.
Without this information, IDEs must update the entire build before running
any test. They can now instead selectively build the test executable
itself and anything that is needed to run it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
A current rather untyped storage of options is one of the things that
contributes to the options code being so complex. This takes a small
step in synching down by storing the compiler options in dicts per
language.
Future work might be replacing the langauge strings with an enum, and
defaultdict with a custom struct, just like `PerMachine` and
`MachineChoice`.
This also fixes that the keys in ArgumentNode.kwargs are
all of the type BaseNode now. Before this commit, it was
possible that both strings and Nodes where used as keys.
Currently it's just like if all builtin/base/compiler options are
yielding. This patch makes possible to have non-yielding builtin
options. The value in is overriden in this order:
- Value from parent project
- Value from subproject's default_options if set
- Value from subproject() default_options if set
- Value from command line if set
The lack of newlines in the print() statement for this error causes the result
to be jumbled and hard to read:
$ ./meson.py introspect
Current directory is not a meson build directory.Please specify a valid build dir or change the working directory to it.It is also possible that the build directory was generated with an oldmeson version. Please regenerate it in this case.
Add newlines so the message is more readable:
$ ./meson.py introspect
Current directory is not a meson build directory.
Please specify a valid build dir or change the working directory to it.
It is also possible that the build directory was generated with an old
meson version. Please regenerate it in this case.
This reverts the changes to the `section` key for the
buildoptions and moves the machine choice into it's
own `machine` key.
With this commit the __undocumented__ breaking change
to the introspection format (introduced in 0.51.0) is
reverted and a new key is added instead.
The host environment could change between the time "meson setup"
produces intro-tests.json, and the time "meson test" is run.
Including it only adds clutter to the introspection data.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This avoids the duplication where the option is stored in a dict at its
name, and also contains its own name. In general, the maxim in
programming is things shouldn't know their own name, so removed the name
field just leaving the option's position in the dictionary as its name.
Some things, like `method[...](...)` or `x: ... = ...` python 3.5
doesn't support, so I made a comment instead with the intention that it
can someday be made into a real annotation.