| Age | Commit message (Collapse) | Author |
|
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 `install_dir` is slightly different than the one in `BuildTarget`
(though I'd like to make them the same in the future). It is only
allowed to be `str | bool | None`, and the implementation has always
assumed this, it would have broken with an array value.
|
|
Among other things it will say "expects X but only has Y", even if Y >
X.
|
|
This just puts the type checking in the frontend, there's still some
serious cleanup in the build and backend that need to happen.
|
|
|
|
|
|
We have some cases where we want to have an extra set of validators that
run on specific types, and give detailed answers. However, we don't want
those types to show up in the list of accepted types. This new keyword
allows for that.
|
|
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.
|
|
By setting the default `set_is_system` to `'preserve'`, we don't have to
have a check for None inside the body of the method.
|
|
Comparing the implementation of build_subdir with
https://github.com/mesonbuild/meson/pull/12258, both of them introduced
a similar separation between srcdir and builddir. There were some
differences in the choices of srcdir vs builddir; this commit tries to
identify which are bugs in which implementation, and get the best of
both worlds.
|
|
|
|
The sample output for the example failed to jibe with reality
in several ways:
- 'prefix' was not included in the inputs, so it isn't displayed
- Boolean values are printed lowercase ('true', not 'True')
- The array formatting would be properly aligned
|
|
Avoid getting a raw exception, instead use a (subclass of) MesonException
that is printed in the usual "FILE:LINE:COLUMN: MESSAGE" format.
Fixes: #15023
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Make the implicit `xyz = ["dep:xyz"]` declaration explicit in the Manifest.
This also makes it possible to implement correctly the part of the spec where
"If you specify the optional dependency with the dep: prefix anywhere in
the [features] table, that disables the implicit feature."
Unfortunately, this can only be done after target-specific configurations
are resolved, which makes it hard to write a unit test for this. Rustix
requires it, though; without this patch, something like
[package]
name = "rustix"
edition = "2021"
rust-version = "1.63"
version = "0.38.34"
[dependencies]
alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" }
libc = { version = "0.2.0", optional = true, package = "libc" }
libc_errno = { version = "0.3.8", optional = true, package = "errno" }
[features]
alloc = []
default = ["std"]
rustc-dep-of-std = ["dep:alloc"]
std = ["alloc"]
use-libc = ["libc_errno", "libc"]
would incorrectly request the rustc-std-workspace-alloc crate via the
chain default->std->alloc. The patch blocks it because it finds the
"dep:alloc" dependency of feature rustc-dep-of-std.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
It should be added even if unexpected_cfgs is not part of Cargo.toml.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This commit adds a closing backtick to the mention of
`configure_file()`, that way it shows up correctly as
preformatted
|
|
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
|
|
|
|
|
|
|
|
The macos 13 runner has been removed, and OpenSSL 1.0 fails to build, so
let's just retire this test.
|
|
Because they're the same as the main arch image.
|
|
|
|
|
|
|
|
There now exists a Windows Vulkan SDK for ARM64, and the latest Vulkan
SDKs for x64 Windows also provides ARM64 libraries and binaries for
cross-builds (and vice-versa).
So, now we have the following in the Vulkan SDKs:
* Bin-ARM64 and Lib-ARM64 in x64 Windows SDKs that contains ARM64
Vulkan binaries and libraries.
* Bin-X64 and Lib-X64 in ARM64 Windows SDKs that contains x64 Vulkan
binaries and libraries
* SDKs after 1.4.x (or so) no longer ships 32-bit Windows binaries and
libraries.
This updates the Vulkan detection logic to account for these differences
so that the correct library is picked up upon linking on Windows,
especially when cross-compiling ARM64 binaries on x64 Windows, and vice
versa, while maintaining compatibility with native and 32-bit builds.
|
|
Current behaviour is to loop over 'sys_args' list which contains both
included and ignored compiler arguments.
This could produce unexpected results when argument is both ignored and
deduplicated.
With the following changes, 'cleaned_sys_args' is used to ensure only
included args are deduplicated.
Example:
CFLAGS (or 'c_args' as Meson option) has '-I${includedir} -L${libdir}'
and LDFLAGS ('c_link_args') has '-L${libdir}'.
Given CFLAGS value is wrong: -L entry belongs to LDFLAGS and thus should
not be included in compiler argument list.
Since we have -L in 'sys_args' list this entry will not be included as
linker flag too!
This is definitely not our goal: wrong entry should just be ignored.
Some debug prints from Meson:
C_ARGS: ['-I/opt/x64-compile/include', '-L/opt/x64-compile/lib']
LINKER_ARGS: ['-L/opt/x64-compile/lib']
RESULT_CARGS: ['-I/opt/x64-compile/include', '-D_FILE_OFFSET_BITS=64']
RESULT_LDARGS: []
(this is captured during compiler.find_library() call)
And this is what we see after applying patch:
C_ARGS: ['-I/opt/x64-compile/include', '-L/opt/x64-compile/lib']
LINKER_ARGS: ['-L/opt/x64-compile/lib']
RESULT_CARGS: ['-I/opt/x64-compile/include', '-D_FILE_OFFSET_BITS=64']
RESULT_LDARGS: ['-L/opt/x64-compile/lib']
|
|
If qt.compile_moc dependencies contain targets.
The generated build does not exibit this dependency ie it is possible
that the dependency build is run concurrently with MOC.
Tell the generator that the MOC calls depends on targets in dependencies to
be generated.
|
|
|
|
|
|
This avoids creating a dictionary every time an arithmetic operator
is evaluated.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Tuples are inefficient, require the ability to use hash table lookup
via either a frozenset or a dictionary.
This also allows using accept_any with COMPARISON_MAP.
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Identifiers are more common than strings, check against 'id'
first.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Match single-character tokens a separate dictionary lookup.
As pointed out by dcbaker, this is even faster than str.index
and gives the syntax error check for free (via KeyError).
It also enables splitting the special-case "if" in two parts, one
for long tokens and one for short tokens, thus providing further
speedup.
This shaves about 2/3rds of the time spent in lex().
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Many crates that have a build.rs will usually require an overlay
with the translated meson/meson.build file. To avoid having to
create a .wrap file, when parsing Cargo.lock autodetect a directory
in subproject/packagefiles/ and add it as the patch_directory.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: 6c88d9992192379511c4777c526786cbacf06167
Fixes: d3542ff690d0be723cfd3ebfaaac99290517837f
Fixes: ff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3
|
|
|
|
|
|
|