| 1 |
--- |
| 2 |
title: Release 1.0.0 |
| 3 |
short-description: Release notes for 1.0.0 |
| 4 |
... |
| 5 |
|
| 6 |
# New features |
| 7 |
|
| 8 |
Meson 1.0.0 was released on 23 December 2022 |
| 9 |
## Compiler check functions `prefix` kwargs accepts arrays |
| 10 |
|
| 11 |
The `prefix` kwarg that most compiler check functions support |
| 12 |
now accepts an array in addition to a string. The elements of the |
| 13 |
array will be concatenated separated by a newline. |
| 14 |
|
| 15 |
This makes it more readable to write checks that need multiple headers |
| 16 |
to be included: |
| 17 |
|
| 18 |
```meson |
| 19 |
cc.check_header('GL/wglew.h', prefix : ['#include <windows.h>', '#include <GL/glew.h>']) |
| 20 |
``` |
| 21 |
|
| 22 |
instead of |
| 23 |
|
| 24 |
```meson |
| 25 |
cc.check_header('GL/wglew.h', prefix : '#include <windows.h>\n#include <GL/glew.h>']) |
| 26 |
``` |
| 27 |
|
| 28 |
## Flags removed from cpp/objcpp warning level 1 |
| 29 |
|
| 30 |
`-Wnon-virtual-dtor` is no longer implied by `meson setup -Dwarning_level=1`. |
| 31 |
|
| 32 |
## Developer environment improvements |
| 33 |
|
| 34 |
When cross compiling, the developer environment now sets all environment |
| 35 |
variables for the HOST machine. It now also sets `QEMU_LD_PREFIX` to the |
| 36 |
`sys_root` value from cross file if property is defined. That means that cross |
| 37 |
compiled executables can often be run transparently on the build machine, for |
| 38 |
example when cross compiling for aarch64 linux from x86_64 linux. |
| 39 |
|
| 40 |
A new argument `--workdir` has been added, by default it is set to build |
| 41 |
directory. For example, `meson devenv -C builddir --workdir .` can be used to |
| 42 |
remain in the current dir (often source dir) instead. |
| 43 |
|
| 44 |
`--dump` now prints shell commands like `FOO="/prepend/path:$FOO:/append/path"`, |
| 45 |
using the literal `$FOO` instead of current value of `FOO` from environment. |
| 46 |
This makes easier to evaluate those expressions in a different environment. |
| 47 |
|
| 48 |
## Deprecate `java.generate_native_headers`, rename to `java.native_headers` |
| 49 |
|
| 50 |
The functions operate in the exact same way. The new name matches more with |
| 51 |
Meson function name styling. |
| 52 |
|
| 53 |
## rust.bindgen accepts a dependency argument |
| 54 |
|
| 55 |
The `bindgen` method of the `rust` module now accepts a dependencies argument. |
| 56 |
Any include paths in these dependencies will be passed to the underlying call to |
| 57 |
`clang`, and the call to `bindgen` will correctly depend on any generated sources. |
| 58 |
|
| 59 |
## String arguments to the rust.bindgen include_directories argument |
| 60 |
|
| 61 |
Most other cases of include_directories accept strings as well as |
| 62 |
`IncludeDirectory` objects, so let's do that here too for consistency. |
| 63 |
|
| 64 |
## The Rust module is stable |
| 65 |
|
| 66 |
Mesa is using the rust module in production, so it's time to mark it as stable. |
| 67 |
|
| 68 |
## `in` operator for strings |
| 69 |
|
| 70 |
`in` and `not in` operators now works on strings, in addition to arrays and |
| 71 |
dictionaries. |
| 72 |
|
| 73 |
``` |
| 74 |
fs = import('fs') |
| 75 |
if 'something' in fs.read('somefile') |
| 76 |
# True |
| 77 |
endif |
| 78 |
``` |
| 79 |
|
| 80 |
## `warning-level=everything` option |
| 81 |
|
| 82 |
The new `everything` value for the built-in `warning_level` enables roughly all applicable compiler warnings. |
| 83 |
For clang and MSVC, this simply enables `-Weverything` or `/Wall`, respectively. |
| 84 |
For GCC, meson enables warnings approximately equivalent to `-Weverything` from clang. |
| 85 |
|