| Age | Commit message (Collapse) | Author |
|
It's not obvious so add a comment, lest someone think handling the case
is a bug.
|
|
We don't always check if a library is actually linkable because of concerns
that a library may not be standalone, so linking against it may still have
unresolved references. We can workaround that by building a shared library
as a test rather than an executable, and in fact we already do that in a
bunch of cases since bb5f2ca3da821d7a8e865cd55a8d5d638e0aab22.
This comes up in particular with Fedora and dependency('atomic') because
on x86_64, they provide a libatomic.so linker script (so our file existence
check passes), but trying to use it later on will fail if the backing package
isn't installed.
_get_file_from_list has not been deleted because the Ninja backend's
guess_library_absolute_path uses it. We might be able to change it to
also use a link test but I've left that alone.
Test notes:
* The _test_all_naming unittest has been tweaked because we were using a
blank file rather than an actual shared library, which (as expected),
now fails.
* I've also added a test for dependency('atomic') providing a result that
can actually be linked against. I've not made it check generally whether
dependency('atomic') finds something when we expect to (at least for now)
as it'll involve some CI whack-a-mole.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2352531
Bug: https://github.com/mesonbuild/meson/issues/14946
Closes: https://github.com/mesonbuild/meson/issues/10936
|
|
In an Ubuntu Bionic container with Python 3.7.5:
```
$ python3 -c 'import tempfile; print(tempfile.mkdtemp(dir=""))'
tmpycdjfo6m
$ python3 -c 'import tempfile; print(tempfile.mkdtemp(dir=None))'
/tmp/tmpy6dlpv0r
```
Pass dir as None to get the behaviour we need - which is how newer Pythons
act, as otherwise we aren't running in the cwd for the compile test
that we expect.
This shows up as a failure in _test_all_naming when _find_library_real is
modified to use links().
|
|
Python added a "feature" to assume tarfile extraction is meant solely
for "data", i.e. it ignores many useful features of tar such as
symlinks, ownership, or permission modes that are uncommon on Windows.
Revert this entirely, as Meson is a "fully trusted" application. It can
already execute arbitrary programs, tar files are not vulnerabilities.
In theory "tar" mode exists and is not "data", but we are fully trusted
so why split hairs?
Fixes: https://github.com/mesonbuild/meson/issues/15142
|
|
Intel's oneAPI installation, as of 2025.3, no longer provides the
classic ifort compiler, only the newer llvm-based ifx compiler.
|
|
The Microchip XC32 compiler is a GCC-based compiler implemented using
existing GNU compiler classes. As the XC32 version and GCC version do
not match mixins have been implemented to override versions used in
versions checks where applicable.
|
|
Replace the hardcoded version strings with class attributes to allow
subclasses to override them.
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Cargo allows path in dependencies even outside a workspace. To support
this in Meson, always create a dummy WorkspaceState outside non-workspace
manifests.
Another bug that this fixes is that the default feature was not added
for workspaces, only for projects.
In addition, this removes some confusion and code duplication
between interpret_package() and interpret_workspace(). Because
they are respectively for top-level directories and subdirectories,
interpret_package always has a project_root and interpret_workspace
never does.
|
|
... and propagate to their packages
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Add a dep_packages cache to PackageConfiguration to store resolved dependencies,
so that there is no need to call _dep_package() again and all knowledge of
how to build arguments is removed from _create_lib()
|
|
While this has no effect, it makes it easier to move the
generation of the rust_dependency_map out of the interpreter.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Generating command line arguments needs the Environment, not the
whole cargo interpreter state. Move it out of Interpreter.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Generating environment variables needs the Environment, not the
whole cargo interpreter state. Move it out of Interpreter.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Make the PackageConfiguration optional: this makes it easy to see
if the package had already been found earlier. This also removes
calls to _prepare_package and makes it idempotent.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The next step is to ensure that all packages are in
self.packages prior to _prepare_package. For now,
instead, ensure that nothing breaks if the packages
are _absent_ from self.packages.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Part of PackageState refers to the package itself, and part to the
feature and dependency resolution process. Pull the latter outside,
in preparation for having different features and dependencies for
the build and the host machine.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
self._add_dependency is idempotent so do it freely, and process DEP/FEATURE
as a self._add_dependency followed by regular DEP?/FEATURE processing.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
In the long term, dependencies that do not have a [lib] table will not
create an invocation of override_dependency; do not expect there to be
a handwritten meson.build that does it.
In particular, this is the case for extra-dep-1-rs in the "rust/22 cargo
subproject" test case, so change that to use the extra_deps mechanism
instead to invoke the subproject.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Leave the cfg symbol free. Only one function is used.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Options are now added to pending_options only if they *can* be accepted
as pending, so there is never a need check if something is in pending_options
but not acceptable.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
No need to focus on the "value" part of the name.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
They are duplicates of what is already in compilers and have no state. Just
use compilers.
Fixes: #15082
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Command line handling had almost complete annotations, but some were missing
(especially argparse related types) or wrong (the native and cross files
passed to the CmdLineFileParser).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
cmd_line.txt is not related to serialized data, in fact it's a fallback
for when serialized data cannot be used and is also related to setting
up argparse for command line parsing. Since there is no code in common
with the rest of coredata, move it to a new module.
Fixes: #15081
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Defining public API in a cross platform library is painful, especially
on Windows. Since every library have to define pretty much the same
macros, better do it in Meson.
|
|
It was the name of root project instead of current subproject. This is
only used by pkgconfig generator.
While at it, simplify the way we get the project version.
|
|
It really isn't a sanity check that a specific compiler doesn't work on
a specific platform. This re-implements the check as a shared component
in the ASMCompiler base class, which has the advantage of code sharing.
|
|
This will be able to hold some shared state between the different ASM
compilers (or should that be assemblers?)
|
|
Make sure that they are checked against the correct extension
on Darwin.
Fixes: #7964
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
See https://forums.opensuse.org/t/cant-find-libboost-system-devel-dependency/188865.
|
|
Stable HDF5 has a fixed .pc file, but we need to enable hdf5[cxx]
for H5Cpp.h.
|
|
|
|
Currently what this does is permit freethreaded builds, which are
stablemasked but not masked, which means we get a binpackage cache miss
for something we frankly very much do not care about at all.
We can and do unmask implementations themselves later on in this file,
which should handle all this for us anyway.
|
|
We've been using the desktop profile until now, mostly because it
automatically provides various frameworks we test e.g. wayland, gtk, qt
etc that all install out of the box. It also guarantees that binpackages
match.
The image is also really fat though. :( Switch to the base profile,
install a few packages that otherwise wouldn't be installed, and tweak
individual USE flags for binary coverage.
|