| Age | Commit message (Collapse) | Author |
|
Some projects may want to override Meson's AST generation for Cargo
projects. This was not really doable before without hard coding the
results of feature resolution; however, now it will be possible by
accessing the results of the global feature resolution from the Rust
module's workspace object.
At the same time, the subproject must keep using the Cargo method,
which is forced by the workspace object's subproject() method,
because otherwise the interpreter is not propagated. So just
skip the interpretation phase if a Meson.build is present.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This simplifies a bunch of cases, and likely fixes some annoying bugs
in cross compile situations where should have been passing this and
weren't.
|
|
This replaces the long explanation of `external_library`s in the
`link_with` parameter to the simpler one used by declare_dependency.
Additionally, declare_dependency now checks that a target is linkable
when adding it. This just catches the problem before it goes down into
the build layer giving a better error message.
There is a bug in the declare_dependency annotations, in that they don't
mark Executable as acceptable. So I've fixed that.
|
|
This puts subclass specific logic in the subclasses, and cleans up some
typing.
|
|
This catches the addition of un-linkable targets at the interpreter
level rather than requiring the build layer to handle this. In turn,
this gives the end user a better error message.
|
|
|
|
What is basically impossible is to handle `SubprojectHolder`, because
it's not a true holder but an interpreter object. Well, impossible
without changing SubprojectHolder into a true holder, because it's
avoiding the circular import becomes extremely convoluted otherwise, and
refactoring is difficult because the held object is itself an
Interpreter. It's a rather complex problem to solve gracefully. I've
punted to avoid the complexity, it does mean that the error message is
somewhat less exact.
I don't think this is actually a huge problem because we've really
guided people away from using `subproject()` and to instead use
dependency fallbacks, which don't have this problem to begin with.
This removes validation from the build layer, and puts it in
interpreter. For code sharing reasons this means that
`internal_dependency` also gets more fine grained error messages.
The test case for this has been modified to use the `testcase
expect_error` construct, and thus has been moved to the common tests
directory. It's also been extended to cover both the library case, which
gives coverage for the `extra_types` in `KwargInfo`
|
|
This just puts the type checking in the frontend, there's still some
serious cleanup in the build and backend that need to happen.
|
|
|
|
With the previous change the build layer no longer needs to be concerned
about strings
|
|
This allows some additional cleanup, as we had code specifically for
doing version checking that was not only used here, and that can be
removed.
|
|
This removes the use of interpreter.extract_incdirs since_strings, and
instead let's typed_kwargs do the work
|
|
Instead of using the `extract_incdirs` function.
|
|
|
|
|
|
Currently, you can call `meson.get_compiler('c')`, if you haven't
initialized 'c' for your project, but a super-project has initialized
it. This happens because we check the wrong set of compilers (the global
list vs the per-subproject one).
Because of how fragile this is, we can mark it as broken an move on.
|
|
The underlying Python implementation throws in this case, and I'm not
sure what the correct result here would be if we allowed it. Convert to
None and don't split? Split every character?
I've gone with throwing InvalidArguments, which maintains the current
behavior of "doesn't work" but with a nicer output. Any other change
would require a FeatureNew anyway, and can wait till 1.11.
Fixes: #15335
|
|
This can come in handy for instance when a custom target creates both
headers and sources. Slicing the output of a `to_list()` call provides
convenient access to just the headers or just the sources.
|
|
|
|
|
|
|
|
|
|
|
|
Compiler.symbols_have_underscore_prefix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This also fixes the `_cross_sizeof` helper
|
|
This also fixes the helper `_cross_alignment` method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This extends the code that strips executable keyword arguments to also
default populate shared_library exclusive arguments.
Fixes: #15238
|
|
Give an user opportunities to mangle a custom short name for a DLL on
OS/2.
|
|
Regression in commit 6ee583e119b432fee03f908547729d5da030397e.
str.version_compare() accepts varargs unless the str was defined via
meson.version(), which isn't supposed to be a visible end user
distinction.
That being said, it makes no sense to support the special casing here.
- FeatureNew only compares conditions with min, not with max
- Having multiple min conditions is illogical and there's no need to
support it.
So we allow varargs for parity, but debug log that we can't handle it
specially and refrain from setting tmp_meson_version at all.
Fixes: https://github.com/mesonbuild/meson/issues/15217
|
|
meson_version: '>=1.8.0' works to control FeatureNew -- but < does not.
Likewise with version_compare.
This may or may not surprise people. Leave a hint in the logfile.
|
|
Of course, this checking isn't actually doing what it claims, as it
doesn't actually stop you from writing at target like:
```meson
build_target(
'foo',
'srcs/main.c',
c_pch : 'src/pch.h',
)
```
|
|
This really isn't a list because it's not homogenous data, it's really
`tuple[str, str | None] | None`, but we're using list length to decide
what to do with it, and that makes for strict null issues, as an
accurate annotation would be `list[str | None]`, which would require a
lot of `is not None` checking. By using a tuple we don't need to keep
checking length, which is more expensive than null checking.
To ensure correctness I annotated some things in the VS backend
|
|
|
|
What's left requires the Environment, so it will have to be handled in
the interpreter implementation for now.
|
|
|