-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRelease-notes-for-0-55-0.html
493 lines (451 loc) · 22.2 KB
/
Release-notes-for-0-55-0.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html>
<html lang="en">
<head>
<base href=".">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Release 0.55.0</title>
<link rel="stylesheet" href="assets/css/dark-frontend.css" type="text/css" title="dark">
<link rel="alternate stylesheet" href="assets/css/light-frontend.css" type="text/css" title="light">
<link rel="stylesheet" href="assets/css/bootstrap-toc.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="assets/js/search/enable_search.css" type="text/css">
<link rel="stylesheet" href="assets/css/notes.css" type="text/css">
<link rel="stylesheet" href="assets/css/prism-tomorrow.css" type="text/css" title="dark">
<link rel="alternate stylesheet" href="assets/css/prism.css" type="text/css" title="light">
<script src="assets/js/mustache.min.js"></script>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/scrollspy.js"></script>
<script src="assets/js/typeahead.jquery.min.js"></script>
<script src="assets/js/search.js"></script>
<script src="assets/js/compare-versions.js"></script>
<script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="assets/js/bootstrap-toc.min.js"></script>
<script src="assets/js/jquery.touchSwipe.min.js"></script>
<script src="assets/js/anchor.min.js"></script>
<script src="assets/js/tag_filtering.js"></script>
<script src="assets/js/language_switching.js"></script>
<script src="assets/js/styleswitcher.js"></script>
<script src="assets/js/lines_around_headings.js"></script>
<script src="assets/js/prism-core.js"></script>
<script src="assets/js/prism-autoloader.js"></script>
<script src="assets/js/prism_autoloader_path_override.js"></script>
<script src="assets/js/prism-keep-markup.js"></script>
<script src="assets/js/trie.js"></script>
<link rel="icon" type="image/png" href="assets/images/favicon.png">
<link rel="shortcut icon" href="assets/images/favicon.png">
</head>
<body class="no-script
">
<script>
$('body').removeClass('no-script');
</script>
<nav class="navbar navbar-fixed-top navbar-default" id="topnav">
<div class="container-fluid">
<div class="navbar-right">
<a id="toc-toggle">
<span class="glyphicon glyphicon-menu-right"></span>
<span class="glyphicon glyphicon-menu-left"></span>
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-wrapper" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span title="light mode switch" class="glyphicon glyphicon-sunglasses pull-right" id="lightmode-icon"></span>
<form class="navbar-form pull-right" id="navbar-search-form">
<div class="form-group has-feedback">
<input type="text" class="form-control input-sm" name="search" id="sidenav-lookup-field" placeholder="search" disabled>
<span class="glyphicon glyphicon-search form-control-feedback" id="search-mgn-glass"></span>
</div>
</form>
</div>
<div class="navbar-header">
<a id="sidenav-toggle">
<span class="glyphicon glyphicon-menu-right"></span>
<span class="glyphicon glyphicon-menu-left"></span>
</a>
<a id="home-link" href="index.html" class="hotdoc-navbar-brand">
<img src="assets/images/meson_logo.png" alt="Home">
</a>
</div>
<div class="navbar-collapse collapse" id="navbar-wrapper">
<ul class="nav navbar-nav" id="menu">
<li class="dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Modules <span class="caret"></span>
</a>
<ul class="dropdown-menu" id="modules-menu">
<li>
<a href="CMake-module.html">CMake</a>
</li>
<li>
<a href="Cuda-module.html">CUDA</a>
</li>
<li>
<a href="Dlang-module.html">Dlang</a>
</li>
<li>
<a href="External-Project-module.html">External Project</a>
</li>
<li>
<a href="Fs-module.html">Filesystem</a>
</li>
<li>
<a href="Gnome-module.html">GNOME</a>
</li>
<li>
<a href="Hotdoc-module.html">Hotdoc</a>
</li>
<li>
<a href="i18n-module.html">i18n</a>
</li>
<li>
<a href="Icestorm-module.html">Icestorm</a>
</li>
<li>
<a href="Java-module.html">Java</a>
</li>
<li>
<a href="Keyval-module.html">Keyval</a>
</li>
<li>
<a href="Pkgconfig-module.html">Pkgconfig</a>
</li>
<li>
<a href="Python-3-module.html">Python 3</a>
</li>
<li>
<a href="Python-module.html">Python</a>
</li>
<li>
<a href="Qt4-module.html">Qt4</a>
</li>
<li>
<a href="Qt5-module.html">Qt5</a>
</li>
<li>
<a href="Qt6-module.html">Qt6</a>
</li>
<li>
<a href="Rust-module.html">Rust</a>
</li>
<li>
<a href="Simd-module.html">Simd</a>
</li>
<li>
<a href="SourceSet-module.html">SourceSet</a>
</li>
<li>
<a href="Wayland-module.html">Wayland</a>
</li>
<li>
<a href="Windows-module.html">Windows</a>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Quick References <span class="caret"></span>
</a>
<ul class="dropdown-menu" id="quick-refs-menu">
<li>
<a href="Reference-manual.html">Functions</a>
</li>
<li>
<a href="Build-options.html">Options</a>
</li>
<li>
<a href="Configuration.html">Configuration</a>
</li>
<li>
<a href="Dependencies.html">Dependencies</a>
</li>
<li>
<a href="Unit-tests.html">Tests</a>
</li>
<li>
<a href="Syntax.html">Syntax</a>
</li>
</ul>
</li>
</ul>
<div class="hidden-xs hidden-sm navbar-text navbar-center">
<p><b>The Meson Build System</b></p>
</div>
</div>
</div>
</nav>
<main>
<div data-extension="core" data-hotdoc-in-toplevel="True" data-hotdoc-project="Meson-documentation" data-hotdoc-ref="Release-notes-for-0-55-0.html" class="page_container" id="page-wrapper">
<script src="assets/js/utils.js"></script>
<div class="panel panel-collapse oc-collapsed" id="sidenav" data-hotdoc-role="navigation">
<script src="assets/js/full-width.js"></script>
<div id="sitenav-wrapper">
<iframe src="hotdoc-sitemap.html" id="sitenav-frame"></iframe>
</div>
</div>
<div id="body">
<div id="main">
<div id="page-description" data-hotdoc-role="main">
<h1 id="new-features">New features</h1>
<h2 id="rpath-removal-now-more-careful">rpath removal now more careful</h2>
<p>On Linux-like systems, Meson adds rpath entries to allow running apps
in the build tree, and then removes those build-time-only rpath
entries when installing. Rpath entries may also come in via LDFLAGS
and via .pc files. Meson used to remove those latter rpath entries by
accident, but is now more careful.</p>
<h2 id="added-ability-to-specify-targets-in-meson-compile">Added ability to specify targets in <code>meson compile</code>
</h2>
<p>It's now possible to specify targets in <code>meson compile</code>, which will
result in building only the requested targets.</p>
<p>Usage: <code>meson compile [TARGET [TARGET...]]</code>
<code>TARGET</code> has the following syntax: <code>[PATH/]NAME[:TYPE]</code>.
<code>NAME</code>: name of the target from <code>meson.build</code> (e.g. <code>foo</code> from <code>executable('foo', ...)</code>).
<code>PATH</code>: path to the target relative to the root <code>meson.build</code> file. Note: relative path for a target specified in the root <code>meson.build</code> is <code>./</code>.
<code>TYPE</code>: type of the target (e.g. <code>shared_library</code>, <code>executable</code> and etc)</p>
<p><code>PATH</code> and/or <code>TYPE</code> can be omitted if the resulting <code>TARGET</code> can be used to uniquely identify the target in <code>meson.build</code>.</p>
<p>For example targets from the following code:</p>
<pre><code class="language-meson">shared_library('foo', ...)
static_library('foo', ...)
executable('bar', ...)
</code></pre>
<p>can be invoked with <code>meson compile foo:shared_library foo:static_library bar</code>.</p>
<h2 id="test-protocol-for-gtest">Test protocol for gtest</h2>
<p>Due to the popularity of Gtest (google test) among C and C++
developers Meson now supports a special protocol for gtest. With this
protocol Meson injects arguments to gtests to output JUnit, reads that
JUnit, and adds the output to the JUnit it generates.</p>
<h2 id="mesonadd__script-methods-accept-new-types">meson.add_*_script methods accept new types</h2>
<p>All three (<code>add_install_script</code>, <code>add_dist_script</code>, and
<code>add_postconf_script</code>) now accept ExternalPrograms (as returned by
<code>find_program</code>), Files, and the output of <code>configure_file</code>. The dist and
postconf methods cannot accept other types because of when they are run.
While dist could, in theory, take other dependencies, it would require more
extensive changes, particularly to the backend.</p>
<pre><code class="language-meson">meson.add_install_script(find_program('foo'), files('bar'))
meson.add_dist_script(find_program('foo'), files('bar'))
meson.add_postconf_script(find_program('foo'), files('bar'))
</code></pre>
<p>The install script variant is also able to accept custom_targets,
custom_target indexes, and build targets (executables, libraries), and
can use built executables a the script to run</p>
<pre><code class="language-meson">installer = executable('installer', ...)
meson.add_install_script(installer, ...)
meson.add_install_script('foo.py', installer)
</code></pre>
<h2 id="machine-file-constants">Machine file constants</h2>
<p>Native and cross files now support string and list concatenation using
the <code>+</code> operator, and joining paths using the <code>/</code> operator. Entries
defined in the <code>[constants]</code> section can be used in any other section.
An entry defined in any other section can be used only within that
same section and only after it has been defined.</p>
<pre><code class="language-ini">[constants]
toolchain = '/toolchain'
common_flags = ['--sysroot=' + toolchain + '/sysroot']
[properties]
c_args = common_flags + ['-DSOMETHING']
cpp_args = c_args + ['-DSOMETHING_ELSE']
[binaries]
c = toolchain + '/gcc'
</code></pre>
<h2 id="configure-cmake-subprojects-with-mesonsubproject_options">Configure CMake subprojects with Meson.subproject_options</h2>
<p>Meson now supports passing configuration options to CMake and
overriding certain build details extracted from the CMake subproject.</p>
<p>The new CMake configuration options object is very similar to the
<a href="Reference-manual_returned_cfg_data.html"><ins><code>cfg_data</code></ins></a> object returned
by <a href="Reference-manual_functions.html#configuration_data"><ins><code>configuration_data()</code></ins></a>. It
is generated by the <code>subproject_options</code> function</p>
<p>All configuration options have to be set <em>before</em> the subproject is
configured and must be passed to the <code>subproject</code> method via the
<code>options</code> key. Altering the configuration object won't have any effect
on previous <code>cmake.subproject</code> calls.</p>
<p><strong>Note:</strong> The <code>cmake_options</code> kwarg for the <code>subproject</code> function is
now deprecated since it is replaced by the new <code>options</code> system.</p>
<h2 id="find_program-fixes-when-the-program-has-been-overridden-by-executable">find_program: Fixes when the program has been overridden by executable</h2>
<p>When a program has been overridden by an executable, the returned
object of find_program() had some issues:</p>
<pre><code class="language-meson"># In a subproject:
exe = executable('foo', ...)
meson.override_find_program('foo', exe)
# In main project:
# The version check was crashing Meson.
prog = find_program('foo', version : '>=1.0')
# This was crashing Meson.
message(prog.path())
# New method to be consistent with built objects.
message(prog.full_path())
</code></pre>
<h2 id="response-files-enabled-on-linux-reined-in-on-windows">Response files enabled on Linux, reined in on Windows</h2>
<p>Meson used to always use response files on Windows,
but never on Linux.</p>
<p>It now strikes a happier balance, using them on both platforms,
but only when needed to avoid command line length limits.</p>
<h2 id="unstablekconfig-module-renamed-to-unstablekeyval">
<code>unstable-kconfig</code> module renamed to <code>unstable-keyval</code>
</h2>
<p>The <code>unstable-kconfig</code> module is now renamed to <code>unstable-keyval</code>. We
expect this module to become stable once it has some usage experience,
specifically in the next or the following release</p>
<h2 id="fatal-warnings-in-gnomegenerate_gir">Fatal warnings in <code>gnome.generate_gir()</code>
</h2>
<p><code>gnome.generate_gir()</code> now has <code>fatal_warnings</code> keyword argument to
abort when a warning is produced. This is useful for example in CI
environment where it's important to catch potential issues.</p>
<h2 id="b_ndebug-support-for-d-language-compilers">b_ndebug support for D language compilers</h2>
<p>D Language compilers will now set -release/--release/-frelease (depending on
the compiler) when the b_ndebug flag is set.</p>
<h2 id="meson-test-now-produces-junit-xml-from-results">Meson test now produces JUnit xml from results</h2>
<p>Meson will now generate a JUnit compatible XML file from test results.
it will be in the <code>meson-logs</code> directory and is called
<code>testlog.junit.xml</code>.</p>
<h2 id="config-tool-based-dependencies-no-longer-search-path-for-cross-compiling">Config tool based dependencies no longer search PATH for cross compiling</h2>
<p>Before 0.55.0 config tool based dependencies (llvm-config,
cups-config, etc), would search system $PATH if they weren't defined
in the cross file. This has been a source of bugs and has been
deprecated. It is now removed, config tool binaries must be specified
in the cross file now or the dependency will not be found.</p>
<h2 id="rename-has_exe_wrapper-can_run_host_binaries">Rename has_exe_wrapper -> can_run_host_binaries</h2>
<p>The old name was confusing as it didn't really match the behavior of
the function. The old name remains as an alias (the behavior hasn't
changed), but is now deprecated.</p>
<h2 id="string-concatenation-in-meson_optionstxt">String concatenation in meson_options.txt</h2>
<p>It is now possible to use string concatenation (with the <code>+</code>
operator) in the <code>meson_options.txt</code> file. This allows splitting long
option descriptions.</p>
<pre><code class="language-meson">option(
'testoption',
type : 'string',
value : 'optval',
description : 'An option with a very long description' +
'that does something in a specific context'
)
</code></pre>
<h2 id="wrap-fallback-url">Wrap fallback URL</h2>
<p>Wrap files can now define <code>source_fallback_url</code> and
<code>patch_fallback_url</code> to be used in case the main server is temporarily
down.</p>
<h2 id="clang-coverage-support">Clang coverage support</h2>
<p>llvm-cov is now used to generate coverage information when clang is
used as the compiler.</p>
<h2 id="local-wrap-source-and-patch-files">Local wrap source and patch files</h2>
<p>It is now possible to use the <code>patch_filename</code> and <code>source_filename</code>
value in a <code>.wrap</code> file without <code>*_url</code> to specify a local source /
patch file. All local files must be located in the
<code>subprojects/packagefiles</code> directory. The <code>*_hash</code> entries are
optional with this setup.</p>
<h2 id="local-wrap-patch-directory">Local wrap patch directory</h2>
<p>Wrap files can now specify <code>patch_directory</code> instead of
<code>patch_filename</code> in the case overlay files are local. Every files in
that directory, and subdirectories, will be copied to the subproject
directory. This can be used for example to add <code>meson.build</code> files to
a project not using Meson build system upstream. The patch directory
must be placed in <code>subprojects/packagefiles</code> directory.</p>
<h2 id="patch-on-all-wrap-types">Patch on all wrap types</h2>
<p><code>patch_*</code> keys are not limited to <code>wrap-file</code> any more, they can be
specified for all wrap types.</p>
<h2 id="link_language-argument-added-to-all-targets">link_language argument added to all targets</h2>
<p>Previously the <code>link_language</code> argument was only supposed to be
allowed in executables, because the linker used needs to be the linker
for the language that implements the main function. Unfortunately it
didn't work in that case, and, even worse, if it had been implemented
properly it would have worked for <em>all</em> targets. In 0.55.0 this
restriction has been removed, and the bug fixed. It now is valid for
<code>executable</code> and all derivative of <code>library</code>.</p>
<h2 id="meson-dist-notests">meson dist --no-tests</h2>
<p><code>meson dist</code> has a new option <code>--no-tests</code> to skip build and tests of
generated packages. It can be used to not waste time for example when
done in CI that already does its own testing.</p>
<h2 id="force-fallback-for">Force fallback for</h2>
<p>A newly-added <code>--force-fallback-for</code> command line option can now be
used to force fallback for specific subprojects.</p>
<p>Example:</p>
<pre><code>meson setup builddir/ --force-fallback-for=foo,bar
</code></pre>
<h2 id="implicit-dependency-fallback">Implicit dependency fallback</h2>
<p><code>dependency('foo')</code> now automatically fallback if the dependency is
not found on the system but a subproject wrap file or directory exists
with the same name.</p>
<p>That means that simply adding <code>subprojects/foo.wrap</code> is enough to add
fallback to any <code>dependency('foo')</code> call. It is however requires that
the subproject call <code>meson.override_dependency('foo', foo_dep)</code> to
specify which dependency object should be used for <code>foo</code>.</p>
<h2 id="wrap-file-provide-section">Wrap file <code>provide</code> section</h2>
<p>Wrap files can define the dependencies it provides in the <code>[provide]</code>
section. When <code>foo.wrap</code> provides the dependency <code>foo-1.0</code> any call do
<code>dependency('foo-1.0')</code> will automatically fallback to that subproject
even if no <code>fallback</code> keyword argument is given. See <a href="Wrap-dependency-system-manual.html#provide_section">Wrap
documentation</a>.</p>
<h2 id="find_program-fallback">
<code>find_program()</code> fallback</h2>
<p>When a program cannot be found on the system but a wrap file has its
name in the <code>[provide]</code> section, that subproject will be used as
fallback.</p>
<h2 id="test-scripts-are-given-the-exe-wrapper-if-needed">Test scripts are given the exe wrapper if needed</h2>
<p>Meson will now set the <code>MESON_EXE_WRAPPER</code> as the properly wrapped and
joined representation. For Unix-like OSes this means python's
shelx.join, on Windows an implementation that attempts to properly
quote windows argument is used. This allow wrapper scripts to run test
binaries, instead of just skipping.</p>
<p>for example, if the wrapper is <code>['emulator', '--script']</code>, it will be passed
as <code>MESON_EXE_WRAPPER="emulator --script"</code>.</p>
<h2 id="added-ability-to-specify-backend-arguments-in-meson-compile">Added ability to specify backend arguments in <code>meson compile</code>
</h2>
<p>It's now possible to specify backend specific arguments in <code>meson compile</code>.</p>
<p>Usage: <code>meson compile [--vs-args=args] [--ninja-args=args]</code></p>
<pre><code> --ninja-args NINJA_ARGS Arguments to pass to `ninja` (applied only on `ninja` backend).
--vs-args VS_ARGS Arguments to pass to `msbuild` (applied only on `vs` backend).
</code></pre>
<p>These arguments use the following syntax:</p>
<p>If you only pass a single string, then it is considered to have all
values separated by commas. Thus invoking the following command:</p>
<pre><code>$ meson compile --ninja-args=-n,-d,explain
</code></pre>
<p>would add <code>-n</code>, <code>-d</code> and <code>explain</code> arguments to ninja invocation.</p>
<p>If you need to have commas or spaces in your string values, then you
need to pass the value with proper shell quoting like this:</p>
<pre><code>$ meson compile "--ninja-args=['a,b', 'c d']"
</code></pre>
<h2 id="introspection-api-changes">Introspection API changes</h2>
<p>dumping the AST (--ast): <strong>new in 0.55.0</strong></p>
<ul>
<li>prints the AST of a meson.build as JSON</li>
</ul>
<h2 id="backendvs-now-matches-db_vscrtfrom_buildtype-behaviour-in-the-ninja-backend">
<code>--backend=vs</code> now matches <code>-Db_vscrt=from_buildtype</code> behaviour in the Ninja backend</h2>
<p>When <code>--buildtype=debugoptimized</code> is used with the Ninja backend, the
VS CRT option used is <code>/MD</code>, which is the <a href="https://mesonbuild.com/Builtin-options.html#b_vscrt-from_buildtype">behaviour documented for
all
backends</a>.
However, the Visual Studio backend was pass <code>/MT</code> in that case, which
is inconsistent.</p>
<p>If you need to use the MultiThreaded CRT, you should explicitly pass
<code>-Db_vscrt=mt</code></p>
</div>
</div>
<div id="search_results">
<p>The results of the search are</p>
</div>
<div id="footer">
<hr>
<div class="license-description">
Website licensing information are available on the <a href="legal.html">Legal</a> page.
</div>
</div>
</div>
<div id="toc-column">
<div class="edit-button">
<a href="https://github.com/mesonbuild/meson/edit/master/docs/markdown/Release-notes-for-0.55.0.md" data-hotdoc-role="edit-button">Edit on GitHub</a>
</div>
<div id="toc-wrapper">
<nav id="toc"></nav>
</div>
</div>
</div>
</main>
<script src="assets/js/navbar_offset_scroller.js"></script>
</body>
</html>