aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
AgeCommit message (Collapse)AuthorFilesLines
10 hoursAdd suffix function to the fs moduleHEADmasterJouke Witteveen1-0/+4
12 hoursAdd -parse-as-library to Swift library targetsKatalin Rebhan1-0/+8
3 daysclang-tidy: run tool only on source files participating in targetsSahnvour1-0/+5
clang-tidy can't be ran as is on every source file and header
5 daysinterpreter: Add a flatten() method to arraysDylan Baker1-0/+5
This allows users to do two things, flatten potentially nested arrays themselves, and, to safely convert types that may be an array to not an array. ```meson x = [meson.get_external_property('may_be_array)].flatten() ``` ```meson x = ['a', ['b', 'c']] assert(x.flatten() == ['a', 'b', 'c']) ```
6 dayswrap: Print deprecation warnings when using wrapdb v1Xavier Claessens1-0/+5
6 daysrust: add rust_dynamic_std optionPaolo Bonzini1-0/+7
As an initial implementation, simply adding "-C prefer-dynamic" works for binary crates (as well as dylib and proc-macro that already used it). In the future this could be extended to other crate types. For more information see the comment in the changed file, as well as https://github.com/mesonbuild/meson/issues/8828 and https://github.com/mesonbuild/meson/issues/14215. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-23docs: Document Swift/C++ interoperability featureAlbert Tang1-0/+13
2025-06-05swift: Pass C base compile options to swiftcKatalin Rebhan1-0/+8
2025-06-05docs: Update docs for eldKushal Pal1-0/+6
Update reference table for eld Mention eld support in release notes Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
2025-05-22Use two hashes in snippet.Jussi Pakkanen1-1/+1
2025-05-22docs: Add response files entryL. E. Segovia1-0/+8
See https://github.com/mesonbuild/meson/pull/14391
2025-05-15docs: mention masm support in release notesZephyr Lykos1-0/+8
2025-05-06Add license keyword to pkgconfig generateCharles Brunet1-0/+3
Fixes #14270.
2025-04-28Add release notes for 1.8 that I forgot.Jussi Pakkanen14-112/+0
2025-04-20document android_exe_type in release notesPaolo Bonzini1-0/+10
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-20document c_std=c2y in release notesPaolo Bonzini1-0/+4
2025-04-20document improvements to Objective-C and Objective-C++Paolo Bonzini1-0/+8
2025-04-20document -Dswift_std in release notesPaolo Bonzini1-0/+4
2025-04-20add wayland stabilisation to release notesPaolo Bonzini1-0/+4
2025-04-09New xgettext method for i18n moduleCharles Brunet1-0/+12
This method call xgettext to extract translatable string from source files into a .pot translation template. It differs from a plain CustomTarget in three ways: - It accepts build targets as sources, and automatically resolves source files from those build targets; - It detects command lines that are too long, and writes, at config time, the list of source files into a text file to be consumed by the xgettext command; - It detects dependencies between pot extraction targets, based on the dependencies between source targets.
2025-04-04rust: add external objects to the link command linePaolo Bonzini1-0/+4
Because rustc does not support extract_objects, QEMU creates a static library with all the C objects. It then passes this static library as link_whole, together with another static library containing general purpose utility functions which is passed as link_with. However, this is brittle because the two have a circular dependency and they cannot be merged because of the link_whole/link_with difference. While lld seems to have the --start-group/--end-group semantics automatically, ld.bfd can fail if these options are needed. This can cause difference between distros depending on how Rust is packaged (e.g. Ubuntu 22.04 and Debian bookworm seem to use ld.bfd). The simplest solution is for Meson to implement "objects:" properly for Rust. Then QEMU can use the same internal dependency objects that it already has in place for C programs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02mtest: set VALGRIND_OPTS to fail tests on errorsSam James1-0/+6
We currently suggest that users run `meson test --wrapper valgrind`, but this doesn't do what one might expect: Valgrind doesn't error out on violations/issues it detects. In the past, we had special handling for Valgrind in tests, see 1f76b76a84cb635f764ecbd2b77aaba1d375d72b but it was later dropped in 951262d7590343ffa9730666c427ad9d708a9fb6. This is similar to what we do for {A,UB,M}SAN_OPTIONS to give sensible behaviour that users expect out-of-the-box. Only do this if we see 'valgrind' in the wrapper command to avoid polluting logs. We may want to do that for the sanitizers variables in future too. Note that we're not adding --exit-on-first-error=yes here, as there may be several issues in an application, or a test may be rather slow, and so on. But --error-exitcode=1 to simply make Valgrind's exit status reflect whether an error was found is uncontroversial. Bug: https://github.com/mesonbuild/meson/issues/4727 Bug: https://github.com/mesonbuild/meson/issues/1105 Bug: https://github.com/mesonbuild/meson/issues/1175 Bug: https://github.com/mesonbuild/meson/issues/13745
2025-04-02rust: add link_whole to rust.test and rust.doctestPaolo Bonzini1-0/+4
QEMU needs it in its integration tests (in order to run global constructors), and therefore in rust.doctest too. With this change I could do: # Rust executables do not support objects, so add an intermediate step. rust_qemu_api_objs = static_library( 'rust_qemu_api_objs', objects: [libqom.extract_all_objects(recursive: false), libhwcore.extract_all_objects(recursive: false)]) rust.doctest('rust-qemu-api-doc', _qemu_api_rs, dependencies: [qemu_api, qemu_api_macros], link_with: libqemuutil, link_whole: [rust_qemu_api_objs], suite: ['doc', 'rust']) followed by "meson test --suite doc". For completeness, add it to rust.test as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02docs: add release notes for "ninja rustdoc"Paolo Bonzini1-0/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-03-09compilers: convert `b_sanitize` to a free-form array optionPatrick Steinhardt1-0/+17
In the preceding commit we have started to perform compiler checks for the value of `b_sanitize`, which allows us to detect sanitizers that aren't supported by the compiler toolchain. But we haven't yet loosened the option itself to accept arbitrary values, so until now it's still only possible to pass sanitizer combinations known by Meson, which is quite restrictive. Lift that restriction by adapting the `b_sanitize` option to become a free-form array. Like this, users can pass whatever combination of comma-separated sanitizers to Meson, which will then figure out whether that combination is supported via the compiler checks. This lifts a couple of restrictions and makes the supporting infrastructure way more future proof. A couple of notes regarding backwards compatibility: - All previous values of `b_sanitize` will remain valid as the syntax for free-form array values and valid combo choices is the same. We also treat 'none' specially so that we know to convert it into an empty array. - Even though the option has been converted into a free-form array, callers of `get_option('b_sanitize')` continue to get a string as value. We may eventually want to introduce a kwarg to alter this behaviour, but for now it is expected to be good enough for most use cases. Fixes #8283 Fixes #7761 Fixes #5154 Fixes #1582 Co-authored-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Patrick Steinhardt <ps@pks.im>
2025-02-27mtest: add option to slice testsPatrick Steinhardt1-0/+6
Executing tests can take a very long time. As an example, the Git test suite on Windows takes around 4 hours to execute. The Git project has been working around the issue by splitting up CI jobs into multiple slices: one job creates the build artifacts, and then we spawn N test jobs with those artifacts, where each test job executes 1/Nth of the tests. This can be scripted rather easily by using `meson test --list`, selecting every Nth line, but there may be other projects that have a similar need. Wire up a new option "--slice i/n" to `meson test` that does implements this logic. Signed-off-by: Patrick Steinhardt <ps@pks.im>
2025-02-13Make all Meson level options overridable per subproject.Jussi Pakkanen1-0/+19
2025-01-27allow to compare multiple version with version_compareCharles Brunet1-0/+8
2025-01-26Created release notes for 1.7.0.Jussi Pakkanen15-131/+0
2025-01-26Ask for testing help for the option refactor branch.Jussi Pakkanen1-0/+16
2025-01-26docs: Add missing release snippet for the TASKING compiler supportgerioldman1-0/+3
2025-01-09Add Linear ASM compilerWu, Zhenyu1-0/+3
Fix #13670
2025-01-08rust: add 2024 editionPaolo Bonzini1-0/+5
Rust edition 2024 is being released in February, add support for rust_std=2024. Resolves: #14074 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-01-08rust: add warning_level=0 to downloaded Cargo subprojectsPaolo Bonzini1-0/+8
This adds --cap-lints allow, matching how Cargo builds them. In the case of Cargo, this is only applied to non-path dependencies. Without this change, clippy will complain about dependencies as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-01-07ninja backend: don't rebuild all tests by defaultEli Schwartz1-0/+29
When running `ninja all` we shouldn't build testsuite programs as these might not be wanted e.g. in order to just install the project. We do want them to be built when running `ninja test`. Since meson 0.63 we actually have a dedicated ninja alias for test dependencies -- move these from the "all" rule to the dedicated test/benchmark rules. Closes: https://github.com/mesonbuild/meson/issues/1704 Closes: https://github.com/mesonbuild/meson/issues/1949 Closes: https://github.com/mesonbuild/meson/issues/2518 Closes: https://github.com/mesonbuild/meson/issues/3662 Closes: https://github.com/mesonbuild/meson/pull/5728 Closes: https://github.com/mesonbuild/meson/pull/5867 Closes: https://github.com/mesonbuild/meson/pull/6511 Closes: https://github.com/mesonbuild/meson/pull/11317 Closes: https://github.com/mesonbuild/meson/issues/13378
2024-12-29dependencies: add custom atomic dependencyDudemanguy1-0/+9
Almost exactly the same as how the dl dependency works. On certain systems (like BSDs that use clang), stdatomic is provided by compiler-rt and doesn't need a separate library explictly linked. On a typical GNU/LINUX system, atomic is a separate library that must be explictly found and linked against. So just add a builtin and system method for these two use cases.
2024-12-19rust: raise a warning if clippy is used instead of rustcPaolo Bonzini1-0/+3
clippy-driver is not meant to be a general-purpose compiler front-end. Since Meson can now provide natively the ability to invoke clippy, raise a warning if someone uses it that way. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-19ninjabackend: add support for "ninja clippy"Paolo Bonzini2-1/+6
Add a target that builds all crates that could be extern to others, and then reruns clippy. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-19scripts: convert run_tool to asyncioPaolo Bonzini1-1/+2
This improves the handling of keyboard interrupt, and also makes it easy to buffer the output and not mix errors from different subprocesses. This is useful for clang-tidy and will be used by clippy as well. In addition, the new code supports MESON_NUM_PROCESSES. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-19introspect: add machine to target_sourcesPaolo Bonzini1-0/+5
Even though the "targets" introspection info already includes the command line arguments used to invoke the compiler, this is not enough to correlated with the "compilers" introspection info and get extra information from there. Together with the existing "language" key, adding a "machine" key is enough to identify completely an entry in the compilers info. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-19mtest: move determine_worker_count to utils, generalizePaolo Bonzini1-0/+7
It is useful to apply a limit to the number of processes even outside "meson test", and specifically for clang tools. In preparation for this, generalize determine_worker_count() to accept a variable MESON_NUM_PROCESSES instead of MESON_TESTTHREADS, and use it throughout instead of multiprocessing.cpu_count(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-06format: allow input from stdinCharles Brunet1-0/+4
Fixes #13791
2024-11-06vcs_tag: Add install kwargsXavier Claessens1-0/+4
Fixes: #4893
2024-10-28external-project: Setup devenv to run programsXavier Claessens1-0/+7
2024-10-26Reimplement several methods for Fortran compilersSébastien Villemot1-0/+8
The output_is_64bit, sizeof, cross_sizeof, compute_int and cross_compute_int methods are reimplemented for Fortran compilers. Those inherited from CLikeCompiler do not work since they assume C or C++. Note that those tests rely on Fortran 2008 features (notably the c_sizeof operator). Closes #12757
2024-10-24cargo: Fix feature resolutionXavier Claessens1-0/+14
Introduce a global Cargo interpreter state that keeps track of enabled features on each crate. Before generating AST of a Cargo subproject, it downloads every sub-subproject and resolves the set of features enabled on each of them recursively. When it later generates AST for one its dependencies, its set of features and dependencies is already determined.
2024-10-20Update docs and version number for release.1.6.0Jussi Pakkanen15-152/+0
2024-10-17Update release notes for 1.6.0.Aditya Vidyadhar Kamath1-0/+7
Closes: #13773.
2024-10-11cargo: Document that cargo subprojects is an experimental featureXavier Claessens1-0/+8
2024-10-11Add options for standard parameter for nvc and nvc++Kevin Meagher1-0/+6
fixes #13271