aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
AgeCommit message (Collapse)AuthorFilesLines
2022-11-06Implement `in` operator on stringXavier Claessens1-0/+11
2022-11-06Generate release notes for 0.64.Jussi Pakkanen19-159/+0
2022-10-24basic support for oneapi compilersRobert Cohn1-0/+8
2022-10-24Add MASM compilerXavier Claessens1-3/+7
ml and armasm are Microsoft's Macro Assembler, part of MSVC.
2022-10-24Accept disablers in summary valuesElliott Sales de Andrade1-0/+3
They are commonly used as a replacement for a `dependency`, and not accepting them in `summary` breaks the last example in [1] when used as a value. [1] https://mesonbuild.com/Disabler.html#disabling-parts-of-the-build
2022-10-24Add yasm as fallback for nasm languageXavier Claessens1-4/+1
2022-10-24Add NASM compilerXavier Claessens1-0/+18
2022-10-23Merge pull request #10916 from xclaesse/preprocessJussi Pakkanen1-0/+14
Add cc.preprocess() method
2022-10-23Add doc and release notes for cc.preprocess()Xavier Claessens1-0/+14
2022-10-23Fix typos in docsElliott Sales de Andrade1-1/+1
2022-10-13Add b_thinlto_cache for automatically configuring incremental ThinLTOTatsuyuki Ishi1-0/+8
2022-10-11Make `meson wrap update` command update all wraps in parallelXavier Claessens1-0/+8
This moves the implementation into msubprojects because it has all the infrastructure to update wraps in parallel while keeping "meson wrap" UX.
2022-10-10Merge pull request #8941 from xclaesse/wrapdbJussi Pakkanen1-0/+6
Automatically use WrapDB fallback
2022-10-10Document and test new WrapDB auto fallbackXavier Claessens1-0/+6
2022-10-09Add BSD support to the JNISystemDependencyTristan Partin1-0/+4
Supports all BSDs that Meson currently supports. Fixes #10883
2022-10-09compilers: Add optimization=plain optionJan Tojnar1-0/+10
https://github.com/mesonbuild/meson/pull/9287 changed the `optimization=0` to pass `-O0` to the compiler. This change is reasonable by itself but unfortunately, it breaks `buildtype=plain`, which promises that “no extra build flags are used”. `buildtype=plain` is important for distros like NixOS, which manage compiler flags for optimization and hardening themselves. Let’s introduce a new optimization level that does nothing and set it as the default for `buildtype=plain`.
2022-09-29doc: Add missing netrc release notesXavier Claessens1-0/+5
2022-09-29doc: Fix wayland release notesXavier Claessens1-2/+2
The core_only kwarg got renamed to include_core_only.
2022-09-28gnome: add support for update-mime-databasePaolo Borelli1-0/+5
Fixes https://github.com/mesonbuild/meson/issues/10865
2022-09-23mtest: implement a maxfail optionEli Schwartz1-0/+6
This allows early exit of the project tests once a certain number of failures are detected. For example `meson test --maxfail=1` will abort as soon as a single test fails. Currently running tests are marked as failed via INTERRUPT. Resolves #9352
2022-09-22Add release notes snippet for new mconf behaviourXavier Claessens1-0/+6
2022-09-19python module: allow specifying the pure kwarg in the installation objectEli Schwartz1-0/+8
Fixes #10523
2022-09-12rust: Generate a rust-project.json file when rust targets are presentDylan Baker1-0/+5
When at least one Rust target is present, we now generate a rust-project.json file, which can be consumed by rust-analyzer. This is placed in the build directory, and the editor must be configured to look for this (as it is not a default search path).
2022-09-06modules/wayland: Support --include-core-onlyMark Bolhuis1-0/+5
wayland-scanner can generate header files that only include wayland-client-core.h using a flag. Add a core_only option to scan_xml to support this use case.
2022-08-23install modes should not apply sticky bit to filesEli Schwartz1-0/+14
This is generally a bad idea, e.g. it causes OSError on freebsd. It also gets ignored by solaris and thus causes unittest failures. The proper solution is to simply reject any attempt to set this, and log a warning. The install_emptydir function does apply the mode as well, and since it is a directory it actually does something. This is the only place where we don't reset the mode. Although install_subdir also installs directories, and in theory it could set the mode as well, that would be a new feature. Also it doesn't provide much granularity and has mixed semantics with files. Better to let people use install_emptydir + install_subdir. Fixes #5902
2022-08-18modules/fs: Replace configure_file(copy:) with fs.copyfileDylan Baker1-0/+17
`configure_file` is both an extremely complicated implementation, and a strange place for copying. It's a bit of a historical artifact, since the fs module didn't yet exist. It makes more sense to move this to the fs module and deprecate this `configure_file` version. This new version works at build time rather than configure time, which has the disadvantage it can't be passed to `run_command`, but with the advantage that changes to the input don't require a full reconfigure.
2022-07-08implement the new preserve_path kwarg for install_data tooEli Schwartz1-0/+8
Primarily interesting to me because it is then available for the python module's install_sources method. Based on the new feature in install_headers.
2022-07-03Finalize the release.0.63.0Jussi Pakkanen18-244/+0
2022-06-19python module: implicitly add python dep to extensionsEli Schwartz1-0/+13
If there isn't a preexisting dependency on python, append one. It's almost assuredly needed, so just do the right thing out of the box.
2022-06-07wrap: Add support for applying a list of patch filesPaweł Marczewski1-0/+6
Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
2022-05-30Implement `preserve_path` for install_headersFlorian "sp1rit"​1-0/+35
The `install_headers` function now has an optional argument `preserve_path` that allows installing multi-directory headerfile structures that live alongside sourcecode with a single command. For example, the headerfile structure headers = [ 'one.h', 'two.h', 'alpha/one.h', 'alpha/two.h', 'alpha/three.h' 'beta/one.h' ] can now be passed to `install_headers(headers, subdir: 'mylib', preserve_path: true)` and the resulting directory tree will look like {prefix} └── include    └── mylib       ├── alpha       │   ├── one.h       │   ├── two.h       │   └── three.h       ├── beta       │   └── one.h       ├── one.h       └── two.h Fixes #3371
2022-05-09python module: default extensions to hidden symbol visibilityEli Schwartz1-0/+12
python compiled extensions should never need to expose any symbol other than PyInit_* which is declared with default visibility via PyMODINIT_FUNC on supported compilers. Thus, a reasonably sane default is to mark any other symbols as hidden, while still respecting any manually specified visibility. Gate this on the version of python itself, as not all versions decorate PyMODINIT_FUNC properly.
2022-05-08compilers/c++: Add MSVC option to make the __cplusplus define accurateEli Schwartz1-0/+15
Otherwise it always returns the value for c++98, starting with MSVC 2017 15.7 or later. Earlier versions are not affected by this mis-feature. See: https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160 This was originally applied as 0b97d585480e973d8b149618901f7a4ddfa1a906 but later reverted because it made the CI red. Try it again, now. Original-patch-by: Dylan Baker <dylan@pnwbakers.com> Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2022-05-06devenv: Set WINEPATH when cross compiling for WindowsXavier Claessens1-0/+4
2022-05-06coverage: be clever and detect config files for gcovr/lcovEli Schwartz1-0/+12
gcovr will read this file anyway, but if it exists we don't need to assume that the project wishes to exclude subprojects/ -- they can determine that themselves. Fixes #3287 Closes #9761 lcov doesn't read the config file by default, but we can do the smart thing here. Fixes #4628
2022-05-03add prefer_static built-in optionDudemanguy1-0/+9
By default, meson will try to look for shared libraries first before static ones. In the meson.build itself, one can use the static keyword to control if a static library will be tried first but there's no simple way for an end user performing a build to switch back and forth at will. Let's cover this usecase by adding an option that allows a user to specify if they want dependency lookups to try static or shared libraries first. The writer of the meson.build can manually specify the static keyword where appropriate which will override the value of this option.
2022-05-03interpreter: new function add_project_dependencies()Paolo Bonzini1-0/+11
This function can be used to add fundamental dependencies such as glib to all build products in one fell swoop. This can be useful whenever, due to a project's coding conventions, it is not really possible to compile any source file without including the dependency. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-01Add support for multiline f-stringsPeter Lesslie1-0/+22
+ Extend the parser to recognize the multiline f-strings, which the documentation already implies will work. The syntax is like: ``` x = 'hello' y = 'world' msg = f'''This is a multiline string. Sending a message: '@x@ @y@' ''' ``` which produces: ``` This is a multiline string. Sending a message: 'hello world' ``` + Added some f-string tests cases to "62 string arithmetic" to exercise the new behavior.
2022-04-30add release snippetRemi Thebault1-0/+13
2022-04-30linkers: Add support for mold linkerFini Jastrow1-0/+4
[why] Support for the relatively new mold linker is missing. If someone wants to use mold as linker `LDFLAGS="-B/path/to/mold"` has to be added instead of the usual `CC_LD=mold meson ...` or `CXX_LD=mold meson ...`. [how] Allow `mold' as linker for clang and newer GCC versions (that versions that have support). The error message can be a bit off, because it is generic for all GNU like compilers, but I guess that is ok. (i.e. 'mold' is not listed as possible linker, even if it would be possible for the given compiler.) [note] GCC Version 12.0.1 is not sufficient to say `mold` is supported. The expected release with support will be 12.1.0. On the other hand people that use the un-released 12.0.1 will probably have built it from trunk. Allowing 12.0.1 is helping bleeding edge developers to use mold in Meson already now. Fixes: #9072 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-04-21Allow deprecating an option for a new oneXavier Claessens1-0/+16
2022-04-19docs: Add documentation on pkgconfig.relocatableFredrik Salomonsson1-0/+18
- Documentation for the pkgconfig.relocatable module option in Builtin-options. Gives an explanation on what it does, usefulness and what error that can occur when using it. - Add pkgconfig.relocatable release snippet. Similar to the documentation in Builtin-options. Just a bit more brief. - Add Pkgconfig to DataTests.test_builtin_options_documented in the docs unit tests.
2022-03-30Add new debug() functionMarvin Scholz1-0/+5
Adds a new debug() function that can be used in the meson.build to log messages to the meson-log.txt that will not be printed to stdout when configuring the project.
2022-03-24Make compilers list per subprojectXavier Claessens1-0/+6
Previously subprojects inherited languages already added by main project, or any previous subproject. This change to have a list of compilers per interpreters, which means that if a subproject does not add 'c' language it won't be able to compile .c files any more, even if main project added the 'c' language. This delays processing list of compilers until the interpreter adds the BuildTarget into its list of targets. That way the interpreter can add missing languages instead of duplicating that logic into BuildTarget for the cython case.
2022-03-22interpreter: Make compiler options per-subprojectXavier Claessens1-0/+9
2022-03-22Add ability to add resources to jarsTristan Partin1-0/+34
Previously Meson lacked the ability to add resources to jar files. Fixes #9945
2022-03-21Prepare the 0.62.0 release.0.62.0Jussi Pakkanen31-371/+0
2022-03-15Revert "devenv: Set PYTHONPATH where we install python modules"Eli Schwartz1-6/+0
This reverts commit 79c6075b560dbf1c3e4e0b30f1c472dc2086421e. # Conflicts: # docs/markdown/snippets/devenv.md # mesonbuild/modules/python.py # test cases/unit/91 devenv/test-devenv.py PYTHONPATH cannot be reliably determined. The standard use case for installing python modules with Meson is mixed pure sources (at least `__init__.py`) and compiled extension_modules or configured files. Unfortunately that doesn't actually work because python will not load the same package hierarchy from two different directories, one a source directory and one a (mandatory) out of tree build directory. (It kind of can, but you need to do what this test case accidentally stumbled upon, which is namespace packages. Namespace packages are a very specific use case and you are NOT SUPPOSED to use them outside that use case, so people are not going to use them just to circumvent Meson devenv stuff as that would have negative install-time effects.) Adding PYTHONPATH anyway will just lead to documentation commitments which we cannot actually uphold, and confusing issues at time of use because some imports *will* work... and some will *not*. The end result will be a half-created tree of modules which just doesn't work together at all, but because it partially works, users attempting to debug it will spend time wondering why parts of it do import. For any case where the automatic devenv would work correctly, it will also work correctly to use `meson.add_devenv()` a single time, which is very easy to manually get correct and doesn't provide any significant value to automate. In the long run, an uninstalled python package environment will require "editable installs" support.
2022-03-13Merge pull request #9339 from dcbaker/submit/structured_sourcesJussi Pakkanen1-0/+26
Structured Sources
2022-03-09Add new env2mfile command.Jussi Pakkanen1-0/+40