| 1 |
--- |
| 2 |
title: Release 0.42 |
| 3 |
short-description: Release notes for 0.42 |
| 4 |
... |
| 5 |
|
| 6 |
# New features |
| 7 |
|
| 8 |
## Distribution tarballs from Mercurial repositories |
| 9 |
|
| 10 |
Creating distribution tarballs can now be made out of projects based |
| 11 |
on Mercurial. As before, this remains possible only with the Ninja |
| 12 |
backend. |
| 13 |
|
| 14 |
## Keyword argument verification |
| 15 |
|
| 16 |
Meson will now check the keyword arguments used when calling any |
| 17 |
function and print a warning if any of the keyword arguments is not |
| 18 |
known. In the future this will become a hard error. |
| 19 |
|
| 20 |
## Add support for Genie to Vala compiler |
| 21 |
|
| 22 |
The Vala compiler has an alternative syntax, Genie, that uses the |
| 23 |
`.gs` file extension. Meson now recognises and uses Genie files. |
| 24 |
|
| 25 |
## Pkgconfig support for additional cflags |
| 26 |
|
| 27 |
The Pkgconfig module object can add arbitrary extra cflags to the Cflags |
| 28 |
value in the .pc file, using the "extra_cflags" keyword: |
| 29 |
```meson |
| 30 |
pkg.generate(libraries : libs, |
| 31 |
subdirs : h, |
| 32 |
version : '1.0', |
| 33 |
name : 'libsimple', |
| 34 |
filebase : 'simple', |
| 35 |
description : 'A simple demo library.', |
| 36 |
extra_cflags : '-Dfoo' ) |
| 37 |
``` |
| 38 |
|
| 39 |
## Base options accessible via get_option() |
| 40 |
|
| 41 |
Base options are now accessible via the get_option() function. |
| 42 |
```meson |
| 43 |
uses_lto = get_option('b_lto') |
| 44 |
``` |
| 45 |
|
| 46 |
## Allow crate type configuration for Rust compiler |
| 47 |
|
| 48 |
Rust targets now take an optional `rust_crate_type` keyword, allowing |
| 49 |
you to set the crate type of the resulting artifact. Valid crate types |
| 50 |
are `dylib` or `cdylib` for shared libraries, and `rlib` or |
| 51 |
`staticlib` for static libraries. For more, see Rust's [linkage |
| 52 |
reference][rust-linkage]. |
| 53 |
|
| 54 |
[rust-linkage]: https://doc.rust-lang.org/reference/linkage.html |
| 55 |
|
| 56 |
## Simultaneous use of Address- and Undefined Behavior Sanitizers |
| 57 |
|
| 58 |
Both the address- and undefined behavior sanitizers can now be used |
| 59 |
simultaneously by passing `-Db_sanitize=address,undefined` to Meson. |
| 60 |
|
| 61 |
## Unstable SIMD module |
| 62 |
|
| 63 |
A new experimental module to compile code with many different SIMD |
| 64 |
instruction sets and selecting the best one at runtime. This module |
| 65 |
is unstable, meaning its API is subject to change in later releases. |
| 66 |
It might also be removed altogether. |
| 67 |
|
| 68 |
|
| 69 |
## Import libraries for executables on Windows |
| 70 |
|
| 71 |
The new keyword `implib` to `executable()` allows generation of an import |
| 72 |
library for the executable. |
| 73 |
|
| 74 |
## Added build_rpath keyword argument |
| 75 |
|
| 76 |
You can specify `build_rpath : '/foo/bar'` in build targets and the |
| 77 |
given path will get added to the target's rpath in the build tree. It |
| 78 |
is removed during the install step. |
| 79 |
|
| 80 |
Meson will print a warning when the user tries to add an rpath linker |
| 81 |
flag manually, e.g. via `link_args` to a target. This is not |
| 82 |
recommended because having multiple rpath causes them to stomp on each |
| 83 |
other. This warning will become a hard error in some future release. |
| 84 |
|
| 85 |
## Vulkan dependency module |
| 86 |
|
| 87 |
Vulkan can now be used as native dependency. The dependency module |
| 88 |
will detect the VULKAN_SDK environment variable or otherwise try to |
| 89 |
receive the vulkan library and header via pkgconfig or from the |
| 90 |
system. |
| 91 |
|
| 92 |
## Limiting the maximum number of linker processes |
| 93 |
|
| 94 |
With the Ninja backend it is now possible to limit the maximum number of |
| 95 |
concurrent linker processes. This is usually only needed for projects |
| 96 |
that have many large link steps that cause the system to run out of |
| 97 |
memory if they are run in parallel. This limit can be set with the |
| 98 |
new `backend_max_links` option. |
| 99 |
|
| 100 |
## Disable implicit include directories |
| 101 |
|
| 102 |
By default Meson adds the current source and build directories to the |
| 103 |
header search path. On some rare occasions this is not desired. Setting |
| 104 |
the `implicit_include_directories` keyword argument to `false` these |
| 105 |
directories are not used. |
| 106 |
|
| 107 |
## Support for MPI dependency |
| 108 |
|
| 109 |
MPI is now supported as a dependency. Because dependencies are |
| 110 |
language-specific, you must specify the requested language with the |
| 111 |
`language` keyword, i.e., `dependency('mpi', language='c')` will |
| 112 |
request the C MPI headers and libraries. See [the MPI |
| 113 |
dependency](Dependencies.md#mpi) for more information. |
| 114 |
|
| 115 |
## Allow excluding files or directories from `install_subdir` |
| 116 |
|
| 117 |
The [[install_subdir]] command |
| 118 |
accepts the new `exclude_files` and `exclude_directories` keyword |
| 119 |
arguments that allow specified files or directories to be excluded |
| 120 |
from the installed subdirectory. |
| 121 |
|
| 122 |
## Make all Meson functionality invocable via the main executable |
| 123 |
|
| 124 |
Previously Meson had multiple executables such as `mesonintrospect` |
| 125 |
and `mesontest`. They are now invocable via the main Meson executable |
| 126 |
like this: |
| 127 |
|
| 128 |
meson configure <arguments> # equivalent to mesonconf <options> |
| 129 |
meson test <arguments> # equivalent to mesontest <arguments> |
| 130 |
|
| 131 |
The old commands are still available but they are deprecated |
| 132 |
and will be removed in some future release. |
| 133 |
|
| 134 |
## Pcap dependency detector |
| 135 |
|
| 136 |
Meson will automatically obtain dependency information for pcap |
| 137 |
using the `pcap-config` tool. It is used like any other dependency: |
| 138 |
|
| 139 |
```meson |
| 140 |
pcap_dep = dependency('pcap', version : '>=1.0') |
| 141 |
``` |
| 142 |
|
| 143 |
## GNOME module mkenums_simple() addition |
| 144 |
|
| 145 |
Most libraries and applications use the same standard templates for |
| 146 |
glib-mkenums. There is now a new `mkenums_simple()` convenience method |
| 147 |
that passes those default templates to glib-mkenums and allows some tweaks |
| 148 |
such as optional function decorators or leading underscores. |