summaryrefslogtreecommitdiff
path: root/docs/yaml
AgeCommit message (Collapse)Author
2024-05-09implement @PLAINNAME0@ and @BASENAME0@Stas Sergeev
@PLAINNAME@ and @BASENAME@ cannot be used in custom_target() with multiple inputs. For those, similar macros are needed with an index. Fixes #13164
2024-05-01Add required kwarg to compiler.{compiles,links,run}Tristan Partin
This is a similar commit to the one that added required to all the compiler.has* functions.
2024-04-23interpreter: implement the `name()` method for `ExternalLibraryHolder`Dylan Baker
This allows `cc.find_library().name()` to work, just like `dependency().name()`. Fixes: #13053
2024-04-14Clarify mutable objects usageXavier Claessens
Only Environment and ConfigurationData are mutable. However, only ConfigurationData becomes immutable after first use which is inconsistent. This deprecates modification after first use of Environment object and clarify documentation.
2024-04-05depends keyword argument: accept CustomTargetIndexGerion Entrup
That holds for all of these meson function: run_target, generator and custom_target and additionally to the Windows and Gnome module.
2024-03-02Merge pull request #12804 from joukewitteveen/dist-rewriterJussi Pakkanen
Support `meson dist` when getting project versions from VCS
2024-02-25docs: clarify environment variables take only ExternalProgram.full_path()L. E. Segovia
Fixes #10901
2024-02-24Allow using CustomTarget as test executableCharles Brunet
Fixes #6567
2024-02-23mtest: set MSAN_OPTIONS to abort by defaultSam James
Followup to 7b7d2e060b447de9c2642848847370a58711ac1c which handles ASAN and UBSAN. It turns out that MSAN needs the same treatment. I've checked other sanitizers like HWASAN and TSAN - it looks like they may both need it too, but Meson doesn't currently suppose those anyway (see https://github.com/mesonbuild/meson/pull/12648). Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-02-23env.unset methodCharles Brunet
2024-02-23doc: fix compiler.preprocess varargs documentationCharles Brunet
This was inherited from documentation of build target, but some sentences do not make sense in the context of the preprocessor.
2024-02-18doc: fix descriptions of dependency and find_programEisuke Kawashima
They accept list as documented
2024-02-12Add MESONREWRITE to `meson dist` scriptsJouke Witteveen
Fixes #688
2024-02-12doc: benchmark: correct usage on unixtaz-007
2024-02-09Document that alias_target accepts run_tgts since 0.60.0Tristan Partin
This was implemented in dc51740e2cdee171ac6ebc7ed261e5c08730c9a9, but was not added to the documentation or marked as a new feature.
2024-01-17compiler.preprocess: add depends kwargStas Sergeev
This patch adds 'depends' keyword to compiler.preprocess(). It allows to execute other targets before doing the preprocessing. Test-case is added to demonstrate that functionality: it generates the header before preprocessing the C source that uses that generated header. Thanks to @bruchar1 for getting this patch to work.
2023-11-24File: Add full_path() methodXavier Claessens
This is needed now that str.format() is not allowing it any more. It is also more consistent with other objects that have that method as well, such as build targets. Fixes: #12406
2023-11-22docs/dependency: fix type of version kwargGerion Entrup
2023-11-22docs: document out of bounds behavior in str.substringFilipe Laíns
Signed-off-by: Filipe Laíns <lains@riseup.net>
2023-11-14dependencies: allow get_variable to define multiple pkgconfig definesEli Schwartz
It was previously impossible to do this: ``` dep.get_pkgconfig_variable( 'foo', define_variable: ['prefix', '/usr', 'datadir', '/usr/share'], ) ``` since get_pkgconfig_variable mandated exactly two (if any) arguments. However, you could do this: ``` dep.get_variable( 'foo', pkgconfig_define: ['prefix', '/usr', 'datadir', '/usr/share'], ) ``` It would silently do the wrong thing, by defining "prefix" as `/usr=datadir=/usr/share`, which might not "matter" if only datadir was used in the "foo" variable as the unmodified value might be adequate. The actual intention of anyone writing such a meson.build is that they aren't sure whether the .pc file uses ${prefix} or ${datadir} (or which one gets used, might have changed between versions of that .pc file, even). A recent refactor made this into a hard error, which broke some projects that were doing this and inadvertently depending on some .pc file that only used the second variable. (This was "fine" since the result was essentially meaningful, and even resulted in behavior identical to the intended behavior if both projects were installed into the same prefix -- in which case there's nothing to remap.) Re-allow this. There are two ways we could re-allow this: - ignore it with a warning - add a new feature to allow actually doing this Since the use case which triggered this bug actually has a pretty good reason to want to do this, it makes sense to add the new feature. Fixes https://bugs.gentoo.org/916576 Fixes https://github.com/containers/bubblewrap/issues/609
2023-10-19mtest: set ASAN_OPTIONS and UBSAN_OPTIONS to abort by defaultSam James
Do as we do for MALLOC_PERTURB and set a sensible value for both ASAN_OPTIONS and UBSAN_OPTIONS to abort on failure and give more helpful output at the same time. We do not set these options if the user has exported a value themselves to allow override. In the last week alone, I've observed two cases where people were expecting sanitizers to abort on failure and were surprised when it didn't: 1) https://github.com/git/git/commit/252d693797912ddb2684733160170f0408b73274 2) https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/c47df433f7bc9936fc59b323ca5e53ea4a04f40e Correct this - which is in-line with meson's DWIM/DTRT philosophy. Signed-off-by: Sam James <sam@gentoo.org>
2023-10-09interpreter: add <lang>_(static|shared)_argsDylan Baker
Which allow passing arguments specifically to the static or shared libraries. For design, this is all handled in the interpreter, by the build layer the arguments are combined into the existing fields. This limits changes required in the mid and backend layers
2023-10-09interpreter: Handle BuildTarget.vala_args as Files in the interpreterDylan Baker
Way back in Meson 0.25, support was added to `vala_args` for Files. Strangely, this was never added to any other language, though it's been discussed before. For type safety, it makes more sense to handle this in the interpreter level, and pass only strings into the build IR. This is accomplished by adding a `depend_files` field to the `BuildTarget` class (which is not exposed to the user), and adding the depend files into that field, while converting the arguments to relative string paths. This ensures both the proper build dependencies happen, as well as that the arguments are always strings.
2023-10-05Add env kwarg in generator.process()Nomura
2023-10-05build: use suffix when getting target id for exesDudemanguy
When checking target names, meson explictly forbids having multiple targets with the same name. This is good, but it is strict and it is impossible to have targets with the same basename and differing suffixes (e.g. foo and foo.bin) in the same directory. Allow this for executables by including the suffix (if it exists) in the interal target id. So foo would be foo@exe and foo.bin would be foo.bin@exe.
2023-09-28add support for vs_module_defs to ExecutablesDylan Baker
fixes: #9254
2023-09-28fix using a CustomTargetIndex for vs_module_defsDylan Baker
Because `CustomTargetIndex`es don't have a `subdir` property, but they do implement the `get_subdir()` method
2023-09-19docs: fix `add_project_link_arguments` documentationBenoit Pierre
It should refer to `add_project_arguments`, not `add_global_arguments`.
2023-09-19Rust: Replace rust_crate_type with rust_abiXavier Claessens
Meson already knows if it's a shared or static library, user only need to specify the ABI (Rust or C).
2023-09-13install_{data,headers,subdir}: implement follow_symlinksArsen Arsenović
This permits users who rely on following symlinks to stay on the old default of following them.
2023-09-09Add support for padding zeroes in int.to_string() methodNomura
2023-09-09Add macro_name option to configure_fileNicholas Vinson
Allow macro_name to be speficied as a parameter to configure_file(). This allows C macro-style include guards to be added to configure_file()'s output when a template file is not given. This change simplifies the creation of configure files that define macros with dynamic names and want the C-style include guards.
2023-09-09clike compilers: fix cross_* functions' includeMoody Liu
A standard C library may not exist for cross-compile environments, thus the existence of <stdio.h> cannot be guaranteed. Use <stddef.h> instead, this header contains compiler-specific defines thus it usually comes from the compiler.
2023-09-07Add compiler.has_defineMarvin Scholz
Adds a new method to the compiler object, has_define. This makes it possible to check if a preprocessor macro/define is set or not. This is especially helpful if the define in question is empty, for example: #define MESON_EMPTY_DEFINE This would yield the same results as a missing define with the existing get_define method, as it would return an empty string for both cases. Therefore this additional method is needed.
2023-08-31add json output format to configure fileCharles Brunet
2023-08-31Doc: fix type signature for add_languages.requiredBruce Merry
It was listed as `bool`, but it can be a `feature` too.
2023-08-18docs: Provide example for feature.disable_auto_ifJan Janssen
2023-08-16Fix some random capitalization in feature.yamlTristan Partin
2023-08-11docs: Add more feature truth tablesJan Janssen
These are much easier to understand at a glance than free-form text.
2023-08-07Compiler: Add werror kwarg to compiles(), links() and run() methodsXavier Claessens
Fixes: #5399
2023-08-07docs: add missing punctuationSebastian Crane
2023-08-05fixup: since: 1.1.0 -> 1.3.0Milan Hauth
2023-08-05compiler: Add required keyword to has_* methodsXavier Claessens
add the "required" keyword to the functions has_function has_type has_member has_members has_argument has_multi_arguments has_link_argument has_multi_link_argument has_function_attribute Co-authored-by: Milan Hauth <milahu@gmail.com>
2023-08-04Add default_options argument to find_program()Nomura
2023-08-02Unify message(), format() and fstring formattingXavier Claessens
Share a common function to convert objects to display strings for consistency. While at it, also add support for formatting user options.
2023-07-28ugh, fix typo in previous commitEli Schwartz
2023-07-28docs: clarify what str.split doesEli Schwartz
The wording was a bit confusing and misled at least one person into thinking it behaved like `str.replace('c', '')` operating on the entire line. Tweak the wording to be more precise and avoid this confusion.
2023-07-26Fix install_data() default install pathDaniele Nicolodi
This fixes two issues in constructing the default installation path when install_dir is not specified: - inside a subproject, install_data() would construct the destination path using the parent project name instead than the current project name, - when specifying preserve_path, install_data() would construct the destination path omitting the project name. Fixes #11910.
2023-07-20interpreter: deprecate 'jar' value of build_target(target_type)Dylan Baker
Jar has a very low set of overlap with other target types, including that jar sources *must* be .java, and no other target allows .java sources. As such, the difficulty in crafting a useful `build_target` invocation that allows both `jar` and anything else is high, and the usefulness is dubious. Just use `jar()` directly instead. This depends on the changes to make all of the jar() specific keyword arguments be handled by typed_kwargs so that the deprecation messages are correct and consistent.
2023-06-27Added a little more useful info to 'link_whole' documentation, describing ↵Dan Hawson
the use of /LINKWHOLE with MSVC and the behaviour of re-exporting symbols of individual objects in a static library.