Mesontest is a new testing tool that allows you to run your tests in many different ways. As an example you can run tests multiple times:
mesontest --repeat=1000 a_test
or with an arbitrary wrapper executable:
mesontest --wrap='valgrind --tool=helgrind' a_test
gdb, 1000 times in a row. This is handy for tests that fail
spuriously, as when the crash happens you are given the full GDB
mesontest --repeat=1000 --gdb a_test
Mesonrewriter is an experimental tool to manipulate your build definitions programmatically. It is not installed by default yet but those interested can run it from the source repository.
As an example, here is how you would add a source file to a build target:
mesonrewriter add --target=program --filename=new_source.c
shared_module function allows the creation of shared
modules, that is, extension modules such as plugins that are meant to
be used solely with
dlopen rather than linking them to targets.
- Detect required programs and print useful errors if missing
- Allow passing a list of directories to
gtkdoc-scangobjfinding local libraries
gresource_bundlekeyword argument to output
- Use depfile support available in GLib >= 2.52.0
merge_file()function for creating translated files
presetkeyword argument to included common gettext flags
- Read languages from
LLVM IR compilation
Meson has long had support for compiling assembler (GAS) files. In
this release we add support for compiling LLVM IR files in a similar
way when building with the Clang compiler. Just add it to the list of
files when creating a
executable target like any other
source file. No special handling is required:
executable('some-exe', 'main.c', 'asm-file.S', 'ir-file.ll')
As always, you can also mix LLVM IR files with C++, C, and Assembly (GAS) sources.
ViM indent and syntax files
We now include filetype, indent, and syntax files for ViM with the source tree. Please file issues (or pull requests!) for enhancements or if you face any problems using them.
Push URLs in .wrap files
.wrap files for subprojects can now include a separate push URL to allow developers to push changes directly from a subproject git checkout.
Meson now supports multiple version restrictions while searching for pkg-config dependencies.
# Just want a lower limit dependency('zlib', version : '>1.2.1') # Want both a lower and an upper limit dependency('opencv', version : ['>=2.3.0', '<=3.1.0']) # Want to exclude one specific broken version dependency('foolite', version : ['>=3.12.1', '!=3.13.99'])
Overriding more binaries with environment variables
You can now specify the binary to be used for the following tools by setting the corresponding environment variable
Similar to other options such as
datadir, you can now
localstatedir for a project by passing
mesonconf after configuration. You can also access it from inside
meson.build file with
New compiler function
Checks if the compiler prefixes an underscore to C global symbols with the default calling convention. This is useful when linking to compiled assembly code, or other code that does not have its C symbol mangling handled transparently by the compiler.
cc = meson.get_compiler('c') conf = configuration_data() if cc.symbols_have_underscore_prefix() conf.set('SYMBOLS_HAVE_UNDERSCORE', true) endif
C symbol mangling is platform and architecture dependent, and a helper function is needed to detect it. For example, Windows 32-bit prefixes underscore, but 64-bit does not. Linux does not prefix an underscore but OS X does.
GLib Resources compiled with
are added to the sources of a Vala build target will now cause the
--gresources flag to be passed to the Vala compiler so
you don't need to add that yourself to
Improvements to install scripts
You can now pass arguments to install scripts added with
arguments after the script name will be passed to the script.
MESON_INSTALL_DESTDIR_PREFIX environment variable is now set
when install scripts are called. This contains the values of the
DESTDIR environment variable and the
prefix option passed to Meson
joined together. This is useful because both those are usually
absolute paths, and joining absolute paths in a cross-platform way is
will discard all previous path segments when it encounters an absolute
path, and simply concatenating them will not work on Windows where
absolute paths begin with the drive letter.
More install directories
Added new options
infodir that can be used for
The results of the search are