summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-06-17interpreter: make operators per-classPaolo Bonzini
Do not call update() and Enum.__hash__ a gazillion times; operators are the same for every instance of the class. In order to access the class for non-trivial operators, the operators are first marked using a decorator, and then OPERATORS is built via __init_subclass__. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-17interpreter: make trivial_operators per-classPaolo Bonzini
Do not call update() and Enum.__hash__ a gazillion times; trivial operators are the same for every instance of the class. Introduce the infrastructure to build the MRO-resolved operators (so the outcome same as if one called super().__init__) for each subclass of InterpreterObject. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-17interpreter: make operator functions binaryPaolo Bonzini
In preparation for moving them to the class, make the operator functions binary. Adjust the lambdas for trivial operators, and store unbound methods for non-trivial ones. Note that this requires adding operators manually for every override, even subclasses. It's decidedly ugly at this temporary stage; later it will result in just an extra @InterpreterObject.operator decorator on the subclasses. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-17interpreter: fix a couple FeatureNew messagesPaolo Bonzini
2025-06-16docs: Generate the devhelp file from the documentationCorentin Noël
Allows to browse the documentation offline.
2025-06-09AstInterpreter: Fix dead-code-crashVolker Weißmann
Without this commit, the rewriter and the static introspection tool crash if `meson.build` contains something like ```meson if false foo = not_defined endif ``` or ```meson if false message(not_defined) endif ``` While it could be argued, that you should not write stuff like this, this used to raise a `MesonBugException`, which we have to fix. Fixes #14667
2025-06-09modules/gnome: Allow to generate markdown and reStructuredText dbus docCorentin Noël
gdbus-docgen supports reStructuredText output since 2.71.1 and markdown since 2.75.2, allow to simply generate it.
2025-06-08add unittest for cmake preprocessingJan200101
it uses the existing 14 configure file test case to configure config 7 and 10 with cmake and meson and then compares the relevant output to see if they are equal
2025-06-08replace regex implementation for cmake with a parserJan200101
cmake does preprocessing in a linear pass through the entire file this allows recursive variable lookups which cannot be supported by a basic regex implementation.
2025-06-08handle empty curly braces correctlyJan200101
in cmake variables are pure strings with no minimal required length so an empty string is a valid key and ${} needs to be handled accordingly.
2025-06-08handle spacing between # and cmakedefineJan200101
just as with C defines cmakedefine supports a variable amount of whitespace between the # symbol and the actual token.
2025-06-06Fix Flang stdlib linking for LLVM toolchain versions >= 19Mugundanmcw
2025-06-05swift: Pass C base compile options to swiftcKatalin Rebhan
2025-06-05unittests: use UnitTest helper methods instead of raw assertDylan Baker
Which doesn't give helpful error messages unless used with pytest
2025-06-05vala: Pass --shared-library to valac when generating a .gir fileCorentin Noël
This is required to make sure that the generated .gir file actually contains all the information to be used dynamically. Valac supports this argument since 0.29.3 released in 2015.
2025-06-05build: Fix tasking compiler b_lto detection for overridesDylan Baker
Actually take an override into account, ie: ```meson library( ... override_options : {'b_lto' : false}, ) ```
2025-06-05backend: fix tasking compiler support after option refactorgerioldman
2025-06-05build: fix tasking compiler b_lto support after option refactorDylan Baker
The weird format is to minimize the diff in the next fixup patch.
2025-06-05unittests: Handle missing compiler support in test_compiler_detectionDylan Baker
This wraps all of the compiler detections in this test case in try/except blocks. These blocks will return a skipTest for Python >= 3.11 (where subTest and skipTest interact correctly), and continue if they do not. For Meson CI runs they will fail the specific subtest, which is also an improvement as it can help pinpoint exactly which subtest failed. Fixes: #14579
2025-06-05unittests: add asserts to test_compiler_detectionDylan Baker
Add a few asserts for functions that could in theory return None, but if they do something has gone *really* wrong with the test.
2025-06-05unittests: use subtests to break up test_compiler_detectionDylan Baker
Which is a very large and complicated test function
2025-06-05vsbackend: detect toolset and SDK version at generate() timePaolo Bonzini
Compilers are not ready at the time the backend is created. Do not look at them until generate() runs. Fixes: 4e9fac15d ("interpreter: add backend options before validating the command line options", 2025-05-16) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-05ninjabackend: clear allow_thin_archives[] at generate() timePaolo Bonzini
Compilers are not ready at the time the backend is created. Do not look at them until generate() runs. Fixes: 4e9fac15d ("interpreter: add backend options before validating the command line options", 2025-05-16) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-05docs: Update docs for eldKushal Pal
Update reference table for eld Mention eld support in release notes Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
2025-06-05Add eld as default linker for Qualcomm Hexagon compilerKushal Pal
Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
2025-06-05Add ELD linkerKushal Pal
ELD is Qualcomm's open-source embedded linker. https://github.com/qualcomm/eld Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
2025-06-04utils: Support VCSs that can have file repodirsDylan Baker
When git is used with worktrees, `.git` will be a file containing a link to the original repo. Currently, we say that this is not git because `.git` isn't a directory.
2025-06-03tests: Add test for checking get_executable_serialization with interpreted ↵L. E. Segovia
executables
2025-06-03gnome.mkenums: Fix get_executable_serialisation passing ExternalPrograms ↵L. E. Segovia
script without interpreter This is an indirect regression of e8c715786d85dcdbc367f3e379acae25a899c235; the code never accounted for ExternalPrograms that needed a harness.
2025-06-03cmake: Fix target_link_libraries against project targetsL. E. Segovia
These were supported for shared libraries, but for static libraries the link_with property was never populated with `LINK_LIBRARIES` or `INTERFACE_LINK_LIBRARIES`. Fixes #13101
2025-06-03wrap: Lock subproject directory when downloading wrapsFlorian "sp1rit"​
To avoid raceconditions, where one instance of meson currently downloads a subproject defined in a wrapfile, while another either a. starts the download itself too b. attemts to evaluate the partially downloaded subproject wraplock introduces a lockfile, which should prevent simultaneous access of subprojects by wrap between different instances of meson.
2025-06-03utils: Replace BuildDirLock with generic DirectoryLockFlorian "sp1rit"​
DirectoryLock provides a generic locking implementation the replaces the previously used BuildDirLock.
2025-06-03ci: Fix cross-cuda actionMaxandre Ogeret
2025-05-31cargo: Add support for target specific dependenciesXavier Claessens
2025-05-31cargo: Do not convert cfg() to Meson ASTXavier Claessens
We'll need to evaluate those expressions before generating the AST. Instead take a config key-value dictionary and evaluate the expression to return a boolean.
2025-05-31cargo: Fix cfg() parsingXavier Claessens
Add cfg token to be able to parse the top level cfg() function. Fix parser which was creating a new iterator when recursing which caused the caller function's iterator to not have advanced when recursing function returns.
2025-05-31Vala: Add test for generated UI in subdirectoriesJames Westman
2025-05-31Vala: Fix GResource source directoriesJames Westman
The code that adds `--gresourcesdir=` arguments to valac based on the source directories of GResource dependencies was incorrect. It added the current target directory to the source path, but the GResource source directories are already relative to the build directory.
2025-05-30cargo: set edition for build machine as wellPaolo Bonzini
This fixes compilation of glib-macros-0.20.4: error[E0405]: cannot find trait `TryFrom` in this scope --> ../subprojects/glib-macros-0.20.4/src/clone.rs:22:10 | 22 | impl<'a> TryFrom<&'a Ident> for CaptureKind { | ^^^^^^^ not found in this scope | = note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021 help: consider importing this trait | 3 + use std::convert::TryFrom; | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-29cuda: add cross-cuda testMaxandre Ogeret
2025-05-29cuda: use target-specific paths under CUDA Toolkit on LinuxMaxandre Ogeret
2025-05-29rewriter: Bugfix concerning `UnknownValue`Volker Weißmann
Without this commit, the static introspection tool crashes when introspecting systemd since certain values are `UnknownValue` which was unexpected. (I tested sytemd's commit hash fefcb935cd.)
2025-05-29rewriter: Rewrite how we add/remove source filesVolker Weißmann
Change the semantics of IntrospectionBuildTarget.source_nodes and IntrospectionBuildTarget.extra_files . The rewriter and the static introspection tool used to be very broken, now it is *less* broken, hence we add some tests in this commit. Fixes #11763
2025-05-29rewriter refactoring: Add rm_src_or_extraVolker Weißmann
De-duplicate some code by extracting the common code into the new `rm_src_or_extra` function.
2025-05-29rewriter: Improve find_target and find_dependencyVolker Weißmann
2025-05-29mesonbuild/ast: make mypy safeVolker Weißmann
2025-05-29Add AstInterpreter.funcvalsVolker Weißmann
`AstInterpreter.node_to_runtime_value` can now resolve function calls.
2025-05-29AstInterpreter: Replace resolve_node with node_to_runtime_valueVolker Weißmann
`resolve_node` is simply a half-broken, worse implementation of `node_to_runtime_value` that we recently introduced. In the example below, the static introspection tool/rewriter now understands that the name of the executable is foo instead of bar: ``` var = 'foo' name = var var = 'bar' executable(name, 'foo.c') ```
2025-05-29rewriter: Remove apparently useless code.Volker Weißmann
Without this commit, something like this crashes the static introspection/rewrite tool: ``` default_options : ['warning_level=' + run_command(['echo', '3']).stdout().strip()], ``` This commit does not reintroduce #14382.
2025-05-29Add AstInterpreter.dataflow_dagVolker Weißmann
Make the AstInterpreter create a directed acyclic graph (called `dataflow_dag`) that stores the how the data flowes from one node in the AST to another. Add `AstInterpreter.node_to_runtime_value` which uses `dataflow_dag` to find what value a variable at runtime will have. We don't use dataflow_dag or node_to_runtime_value anywhere yet, but it will prove useful in future commits.