Paolo Bonzini
8596b3bcd1
interpreter: detect and pass compiler to be used for linker tests
...
Allow using the links method to test that the C++ driver (e.g. g++) can be used to
link C objects. One usecase is that the C compiler's libsanitizer might not be
compatible with the one included by the C++ driver.
This is theoretically backwards-incompatible, but it should be treated as a
bugfix in my opinion. There is no way in Meson to compile a .c file with the
C++ driver as part of a build target, therefore there would be no reason to
do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')).
Fixes : #7703
3 years ago
Dylan Baker
11fbaf29d8
interpreter: fix cases of `KwargInfo(..., T, default=None)`
...
The correct way to mark these is `KwargInfo(..., (T, type(None)))`.
There's also a few cases of `(T, None)` which is invalid, as `None`
isn't a type
3 years ago
Dylan Baker
aa895b383c
interpreter: Add a helper for checking constrained inputs
...
This is quite valuable for enum-like inputs, where only a certain set
of values is allowed.
3 years ago
Dylan Baker
272674e792
interpreter/compiler: make helper methods protected
3 years ago
Dylan Baker
b30dddd4e5
interpreter/compiler: Add type checking for the Compiler object
...
This adds a full set of `typed_pos_args` and `typed_kwarg` decorations,
as well as fixing all of the typing errors reported by mypy.
3 years ago
Dylan Baker
bcb5400e34
interpreter/compiler: Add type annotations to TryRunResultHolder
3 years ago
Dylan Baker
7dda90f1bf
interpreter/compiler: remove unittest_args method
...
It's not documented, and it's been marked deprecated for who knows how
long.
3 years ago
Dylan Baker
32d3b5c9e2
interpreter/compiler: Replace permittedKwargs({}) with noKwargs
...
The former isn't really correct, as it wants a set and is getting a
dict, the other is also conceptually clearer I think.
3 years ago
Laurin-Luis Lehning
281f5abee3
interpreter: Replace manual kwarg validation in compiler.get_supported_arguments with @typed_kwargs
3 years ago
Laurin-Luis Lehning
d5ed8f61a5
interpreter: Move argument checks from add_*_arguments to compiler.get_supported_arguments
3 years ago
Daniel Mensinger
7c757dff71
holders: Fix the remaining code to respect the holder changes
3 years ago
Daniel Mensinger
202e345dfb
interpreter: Refactor interpreter.compiler to use ObjectHolder
3 years ago
Xavier Claessens
558a7bc6ff
interpreter: Move to its own folder and split it
4 years ago