[PATCH v3 00/11] meson: a couple of additions
From: Patrick Steinhardt <hidden>
Date: 2025-01-22 12:05:50
Hi,
this small patch series backfills in a couple of missing features into
Meson. It also improves test coverage of our Meson-based CI jobs so that
we compile with Meson with Visual Studio and compile fuzzers. CI runs
for GitLab and GitHub can be found at [1] and [2], respectively.
The series is built on top of fbe8d3079d (Git 2.48, 2025-01-10) with
ps/meson-weak-sha1-build at 6a0ee54f9a (meson: provide a summary of
configured backends, 2024-12-30) merged into it.
Changes in v2:
- Consistently use `meson.has_header_symbol()` to fix warnings for
features not yet available in Meson 0.61, which is our minimum
required version.
- Add another patch that makes use use `--fatal-meson-warnings` so
that such warnings will cause the build to fail.
- Fix a bug that made GIT-VERSION-GEN always return tags as version.
- Adapt the approach we use to populate the project and distribution
tarball versions.
- Link to v1: https://lore.kernel.org/r/20250113-b4-pks-meson-additions-v1-0-97f6a93f691d@pks.im (local)
Changes in v3:
- Fix a commit message typo.
- Revamp how the distribution tarball is created so that we don't have
to adapt `GIT-VERSION-GEN` for it.
- Link to v2: https://lore.kernel.org/r/20250114-b4-pks-meson-additions-v2-0-8d7ec676cfd9@pks.im (local)
Thanks!
Patrick
[1]: https://gitlab.com/gitlab-org/git/-/merge_requests/280
[2]: https://github.com/git/git/pull/1870
---
Patrick Steinhardt (11):
GIT-VERSION-GEN: simplify computing the dirty marker
GIT-VERSION-GEN: allow running without input and output files
meson: populate project version via GIT-VERSION-GEN
meson: fix dependencies for generated headers
meson: wire up development environments
meson: wire up generation of distribution archive
meson: wire up fuzzers
meson: make the CSPRNG backend configurable
meson: fix compilation with Visual Studio
ci: raise error when Meson generates warnings
ci: wire up Visual Studio build with Meson
.github/workflows/main.yml | 52 +++++++++++++++++++++++++++
.gitlab-ci.yml | 38 ++++++++++++++++++++
GIT-VERSION-GEN | 50 +++++++++++++++-----------
ci/run-build-and-tests.sh | 4 ++-
meson.build | 88 +++++++++++++++++++++++++++++++++++++---------
meson_options.txt | 4 +++
oss-fuzz/meson.build | 20 +++++++++++
7 files changed, 218 insertions(+), 38 deletions(-)
Range-diff versus v2:
1: 55d804eaaf = 1: 60298f9c26 GIT-VERSION-GEN: simplify computing the dirty marker
2: 617527f489 = 2: 91d302da94 GIT-VERSION-GEN: allow running without input and output files
3: d1566ba566 ! 3: 806c05dfb1 meson: populate project version via GIT-VERSION-GEN
@@ Commit message
meson: populate project version via GIT-VERSION-GEN
The Git version for Meson is currently wired up manually. It can thus
- grow (and alread has grown) stale quite easily, as having multiple
+ grow (and already has grown) stale quite easily, as having multiple
sources of truth is never a good idea. This issue is mostly of cosmetic
nature as we don't use the project version anywhere, and instead use the
GIT-VERSION-GEN script to propagate the correct version into our build.
4: bf3063ff51 = 4: dd3abd3dca meson: fix dependencies for generated headers
5: 5ba393fa8e = 5: cb78c1d7d3 meson: wire up development environments
6: f4e076bed7 < -: ---------- meson: wire up generation of distribution archive
-: ---------- > 6: 715da14a23 meson: wire up generation of distribution archive
7: 4e30bf0bb6 = 7: 9c5b82dd45 meson: wire up fuzzers
8: af5ec69b3a = 8: 393ea8a671 meson: make the CSPRNG backend configurable
9: 82ff90ff8b = 9: 6d1a2b1978 meson: fix compilation with Visual Studio
10: f9d2f1b9f6 = 10: 3142fdab0b ci: raise error when Meson generates warnings
11: c9d480ddc6 = 11: 6c339cd012 ci: wire up Visual Studio build with Meson
---
base-commit: 35a417ddf0eab983e4d5eb69e628aa198114bb05
change-id: 20250107-b4-pks-meson-additions-055c16b3052b