Meson build system release 1.0

The release of the Meson 1.0.0 build system has been published, which is used to build projects such as X.Org Server, Mesa, Lighttpd, systemd, GStreamer, Wayland, GNOME and GTK. The Meson code is written in Python and is licensed under the Apache 2.0 license.

The key development goal of Meson is to provide a high speed assembly process combined with convenience and ease of use. Instead of make, the build uses the Ninja toolkit by default, but other backends such as xcode and VisualStudio can also be used. The system has a built-in multi-platform dependency handler that allows you to use Meson to build packages for distributions. Assembly rules are set in a simplified domain-specific language, they are well readable and understandable to the user (according to the authors' idea, the developer should spend a minimum of time writing rules).

Cross-compiling and building on Linux, Illumos/Solaris, FreeBSD, NetBSD, DragonFly BSD, Haiku, macOS and Windows using GCC, Clang, Visual Studio and other compilers is supported. It is possible to build projects in various programming languages, including C, C++, Fortran, Java and Rust. An incremental build mode is supported, in which only components that are directly related to changes made since the last build are rebuilt. Meson can be used to generate repeatable builds, where running the build in different environments results in completely identical executables.

Main innovations of Meson 1.0:

  • The module for building projects in the Rust language has been declared stable. This module is used in the Mesa project to build components written in Rust.
  • Supported by most compiler checking functions, the prefix option implements the ability to handle arrays other than strings. For example, you can now specify: cc.check_header('GL/wglew.h', prefix : ['#include ', '#include '])
  • A new "--workdir" argument has been added to allow you to override the working directory. For example, to use the current directory instead of the working directory, you can run: meson devenv -C builddir --workdir .
  • New operators "in" and "not in" are proposed for determining the occurrence of a substring in a string, similar to the previously available check for the occurrence of an element in an array or dictionary. For example: fs = import('fs') if 'something' in fs.read('somefile') # True endif
  • Added "warning-level=everything" option to turn on output of all available compiler warnings (in clang and MSVC uses -Weverything and /Wall, and in GCC separate warnings are included, roughly corresponding to the -Weverything mode in clang).
  • The rust.bindgen method implements the ability to process the "dependencies" argument to pass paths to dependencies that should be processed by the compiler.
  • The java.generate_native_headers function has been deprecated and renamed to java.native_headers to match Meson's general function naming style.

Source: opennet.ru

Add a comment