Meson build system release 1.3

The release of the Meson 1.3.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-compilation and assembly are supported. Linux, Illumos/Solaris, FreeBSD, NetBSD, DragonFly BSD, Haiku, macOS Šø Windows Using GCC, Clang, Visual Studio, and other compilers. Projects can be built in various programming languages, including C, C++, Fortran, Java, and Rust. Incremental build mode is supported, which rebuilds only components directly related to changes made since the previous build. Meson can be used to create repeatable builds, where running the build in different environments results in the generation of completely identical executable files.

Main innovations of Meson 1.3:

  • Added the option ā€œwerror: trueā€ to the compiler check methods compiler.compiles(), compiler.links() and compiler.run(), which treats compiler warnings as errors (can be used to check that the code is built without warnings).
  • Added has_define method to check symbol definition by preprocessor.
  • The macro_name parameter has been added to the configure_file() function, adding macro protection for double connections through ā€œ#includeā€ (ā€œinclude guardsā€), designed in the style of macros in the C language (simplifying the creation of configure files with dynamic macro names).
  • A new output format has been added to configure_file() - JSON (ā€œoutput_format: jsonā€).
  • Added the ability to use lists of values ​​to the c_std and cpp_std parameters (for example, ā€œdefault_options: 'c_std=gnu11,c11′’).
  • In modules that use CustomTarget to process files, the ability to customize messages output by the ninja utility has been added.
  • The build_target "jar" has been deprecated and the "jar()" call is recommended instead.
  • The 'env' parameter has been added to the generator.process() method to set the environment variable through which the generator will process input.
  • When specifying build target names associated with executables, suffixes such as "executable('foo', 'main.c', name_suffix: 'bar')" are allowed to generate additional executables in the same directory.
  • Added the ā€œvs_module_defsā€ parameter to the exectuable() function to use a def file that defines the list of functions passed to shared_module().
  • Added 'default_options' parameter to find_program() function to set default options for fallback subproject.
  • Added fs.relative_to() method, which returns the relative path for the first argument, relative to the second, if the first path exists. For example, "fs.relative_to('/prefix/lib', '/prefix/bin') == '../lib')".
  • The following_symlinks parameter has been added to the install_data(), install_headers() and install_subdir() functions; when set, symbolic links are followed.
  • A ā€œfillā€ parameter has been added to the int.to_string() method to incrementally fill the string with leading zeros. For example, calling message(n.to_string(fill: 3)) for n=4 will produce the string "004".
  • Added a new target, clang-tidy-fix, that specifies running the clang-tidy utility with the "-fix" flag.
  • The ability to specify the suffix (TARGET_SUFFIX) of the assembly target ([PATH_TO_TARGET/]TARGET_NAME.TARGET_SUFFIX[:TARGET_TYPE]) has been added to the compile command.
  • Added environment variable MESON_PACKAGE_CACHE_DIR to override the path to the package cache (subprojects/packagecache), for example, allowing you to use a shared cache in several projects.
  • Added "meson setup --clearcache" command to clear persistent cache.
  • Support for the ā€œrequiredā€ keyword has been added to all ā€œhas_*ā€ compiler check methods, for example, instead of ā€œassert(cc.has_function('some_function'))ā€ you can now specify ā€œcc.has_function('some_function', required: true)ā€.
  • A new keyword, rust_abi, has been added to the shared_library(), static_library(), library(), and shared_module() functions, which should be used instead of the deprecated rust_crate_type.

Source: opennet.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers šŸ”„ Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster