| Age | Commit message (Collapse) | Author |
|
While developing I often got a confusing 'Neither a subproject directory nor
a None.wrap file was found'. Replace it with a clear message that explains:
1. Which dependency couldn't be found
2. What versions are available in the root Cargo.lock
3. That this is likely a version conflict
4. How to fix it (update dependencies to match root Cargo.lock)
Example:
ERROR: Dependency 'socket2-0.4-rs' not found. Root Cargo.lock provides:
socket2-0.5-rs, socket2-0.6-rs. This could be a Meson bug, please report it.
I am actually not sure if this is really always a Meson bug. But to be
safe, suggest reporting it until more experience is gained.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This allows modifying the version number before the package is fetched.
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
When processing cargo subprojects, each Resolver was independently
loading Cargo.lock files, leading to duplicate wraps and errors like
'Multiple wrap files provide dependency'.
Instead, build the cargo.Interpreter as soon as a Cargo.lock file is
found, and merge that Cargo.lock into the wrap resolver. There is no
need anymore to build a separate resolver for the dependent packages,
because their indirect dependencies are all listed in the parent lockfile.
|
|
Allow creating the cargo.Interpreter (and thus parsing the Cargo.lock file)
even before 'rust' is added as a language.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Do not create a single cargo.Interpreter for the whole execution, instead
create one as soon as a Cargo.lock file is read and only make it last until
that Cargo.lock has been processed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This avoids cloning the same repo multiple times, instead a single wrap
can provide multiple cargo dependencies.
|
|
These could also be target dependencies, which would fail the test
in _add_dependency
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
|
|
The `rc.exe` resource compiler neither provides *depfile* support nor
allows showing includes, as is possible with C or C++ compilers.
Therefore, changes to files included by the `.rc` file did not trigger
recompilation of the resource file.
A workaround was added to *meson* by calling the preprocessor on the
`.rc` file to detect the included headers and adding the result as a
dependency to the resource compilation.
|
|
|
|
was wrongly tagged in 59c3dd1
|
|
Work around https://github.com/llvm/llvm-project/issues/129881.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Use the same check for all of clang, nasm and rustc.
This also avoids the following warning:
Sanity check compiler command line: clang++ sanitycheckobjcpp.mm -o sanitycheckobjcpp.exe -D_MT -D_DLL -D_DEBUG -D_FILE_OFFSET_BITS=64 -Wl,-fms-runtime-lib=dll_dbg Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option /fms-runtime-lib=dll_dbg; ignored
iWhat happens is that -fms-runtime-lib sets up an automatic dependency
from the .o files to the final link product, and therefore must be
passed as a compiler argument. But the constructor for ClangCompiler
was incorrectly allowing b_vscrt for MINGW, so I messed up the logic.
With this change, MINGW won't get the b_vscrt option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
There are a lot of spelled out unions for these types, lets reduce that
number
|
|
|
|
Which can help type checkers in some cases
|
|
|
|
|
|
Fix the original bug fix for #13950 to only warn
about empty required strings, instead of failing
the entire build. This will simplify the workflow
for users that build the string from a possibly
empty list, and save them the need for the added
if-check.
Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
|
|
|
|
|
|
The parent `__init__` was setting cached_version back to None.
This fixes a regression caused by
https://github.com/mesonbuild/meson/pull/8885.
|
|
On Windows, rustc searches both FOO.lib and libFOO.a when passed -lfoo.
This means that the check for nonstandard names in the Unix sense is
too struct, and indeed it breaks passing for example -lkernel32 (which
adds kernel32.lib to the link).
Fix this by special casing Windows. Extract the logic to the Rust
compiler class for clarity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The variable for the .a here is called "a", not "lib".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Add missing checks for correctness of string dependency, including
case for malformatted versioned dependency.
Resolves #13950.
Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
|
|
`rustc --crate-type staticlib --print native-static-libs` doesn't print
the default libraries being linked with rustc by default, at least not
with rustc 1.89.0 (29483883e 2025-08-04).
Stripping those by default, such as ws2_32 on win32, prevents from
linking programs using sockets (ex qemu).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
When verbatim is not available, libraries that have custom name_prefix or
name_suffix will not be found. Fail the build completely instead of
ending up with a bad option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
When Meson cannot use -Clink-arg=, it has to split the path into a -L
option (to add to the search directory) and a -l option (to actually
link). Furthermore, if rustc does not support verbatim, Meson needs to
undo the addition of "lib" and the extension.
Do both tasks in the same place and with the same logic, instead of
treating internal and external libraries differently.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Do not link with link_whole/bundle, to show linking issue with Apple ld.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: #2296
Fixes: #4481
Fixes: #5968
|
|
Same as the previous, but for VAPI
|
|
This allows targets that don't link with a vala target to rely on the
header generation.
|
|
Fixes #14998
|
|
Which have existed for a *long* time, but are only documented in the
Vala docs.
|
|
This reverts commit 1e254ad7f327e5ed2021463e4b66c37072d354e3.
|
|
This reverts commit be50d0e23737dc0fc5f074a291644d7fde39ef7b.
|
|
The keys are always global and there are no yielding
options in fact; historically it was the way to make an option
not per-subproject, but that's no longer needed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Just move everything to optstore, together with the methods it calls.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
optstore is able to set buildtype correctly.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Avoid different but equivalent code between ast and regular
interpreter, and avoid using coredata.set_options since
all options are known to be backend options.
Move to environment since it uses environment.options.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The key is valid and there is no added functionality from coredata.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This is a simple access, and there are already uses of COMPILER_BASE_OPTIONS
outside options.py.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Only return True if the option actually exists. While at it, ensure
that the right machine is looked up in get_default_for_b_option; this
allows removing the try/except block.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|