summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-10-31compilers: cpp: add comment wrt GCC -stdlib=libc++ caseSam James
It's not obvious so add a comment, lest someone think handling the case is a bug.
2025-10-31Always check if found libraries are linkableSam James
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
2025-10-31compilers: handle older Python behaviour for TemporaryDirectorySam James
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().
2025-10-30mdist: fix failure to create tar files the user asked to createEli Schwartz
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
2025-10-30Add ifx to list of Fortran compilers on WindowsMads Bach Villadsen
Intel's oneAPI installation, as of 2025.3, no longer provides the classic ifort compiler, only the newer llvm-based ifx compiler.
2025-10-29compilers: add Microchip XC32 compilerLiza Chevalier
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.
2025-10-29compilers/gnu: use version attributes for feature checksLiza Chevalier
Replace the hardcoded version strings with class attributes to allow subclasses to override them.
2025-10-29cargo: add check-cfg for system_deps_have_* symbolsPaolo Bonzini
2025-10-29cargo: use subproject() if a workspace member is in subprojects/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: propagate PackageState from the full resolution into workspacesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: always create a dummy workspacePaolo Bonzini
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.
2025-10-29cargo: mark workspaces as downloadedPaolo Bonzini
... and propagate to their packages Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: extract _resolve_packagePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: move rust_dependency_map generation to PackageConfigurationPaolo Bonzini
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()
2025-10-29cargo: put all dependencies in the rust_dependency_mapPaolo Bonzini
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>
2025-10-29cargo: move rustc argument generation to PackageState and PackageConfigurationPaolo Bonzini
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>
2025-10-29cargo: move environment generation to PackageStatePaolo Bonzini
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>
2025-10-29cargo: move _prepare_package outside _fetch_packagePaolo Bonzini
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>
2025-10-29cargo: ensure all prepared package are in self.packagesPaolo Bonzini
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>
2025-10-29cargo: pull feature and dependency data out of PackageStatePaolo Bonzini
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>
2025-10-29cargo: unify handling of DEP/FEATURE and DEP?/FEATUREPaolo Bonzini
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>
2025-10-29cargo: only create dependencies if there is a [lib] tablePaolo Bonzini
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>
2025-10-29cargo: remove cfg importPaolo Bonzini
Leave the cfg symbol free. Only one function is used. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: use Package.api directlyPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: allow putting "." in membersPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: ensure default members is validPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cargo: avoid AttributeError if cargolock is NonePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29compilers/nvidia_hpc: support C/C++ -stdEisuke Kawashima
2025-10-29coredata: finish typing annotationsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29replace "in d.keys()" with "in d"Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29options: clean up handling of pending_optionsPaolo Bonzini
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>
2025-10-29build: remove unnecessary try/exceptPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29options: rename get_value_object_and_value_forPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29options: rename get_value_object_forPaolo Bonzini
No need to focus on the "value" part of the name. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29environment: move tool detection functions to a new modulePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29environment: move detection functions to envconfig.pyPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29environment, backends: remove is_* methodsPaolo Bonzini
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>
2025-10-29environment, compilers: move is_library caching to the sourcePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29cmdline: fix typing issuesPaolo Bonzini
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>
2025-10-29coredata: move cmd_line.txt and command line handling to a new modulePaolo Bonzini
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>
2025-10-29Add snippets.symbol_visibility_header() methodXavier Claessens
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.
2025-10-29modules: Fix state.project_name valueXavier Claessens
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.
2025-10-29compilers/asm: Move arch support check to initializerDylan Baker
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.
2025-10-29compilers/asm: Introduce an ASMCompiler base classDylan Baker
This will be able to hold some shared state between the different ASM compilers (or should that be assemblers?)
2025-10-29test cases/rust: adjust expected installed paths for shared librariesPaolo Bonzini
Make sure that they are checked against the correct extension on Darwin. Fixes: #7964 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-29ci: opensuse: replace libboost_system-develSam James
See https://forums.opensuse.org/t/cant-find-libboost-system-devel-dependency/188865.
2025-10-29tests: don't skip HDF5 for Gentoo anymoreSam James
Stable HDF5 has a fixed .pc file, but we need to enable hdf5[cxx] for H5Cpp.h.
2025-10-29ci: add qtdeclarative to gentooEli Schwartz
2025-10-29ci: gentoo: don't accept unstable python-execEli Schwartz
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.
2025-10-29ci: gentoo: use a slimmer base imageEli Schwartz
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.