Re: [PATCH v2 07/13] meson: drop separate version library
- From
Toon Claes <toon@iotcl.com>
- Date
- Feb 7, 2025, 13:24 UTC
- Message-ID
- <8734gp51lx.fsf@iotcl.com>
- In-Reply-To
- <20250130-b4-pks-meson-improvements-v2-7-2f05581ffb44@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 15 quoted lines
> When building `libgit.a` we link it against a `libgit_version.a` library > that contains the version information that we inject at build time. The > intent of this is to avoid rebuilding all of `libgit.a` whenever the > version changes. But that wouldn't happen in the first place, as we know > to just rebuild the files that depend on the generated "version-def.h" > file. > > This is an artifact of an earlier version of the Meson build infra that > didn't ultimately land. We didn't yet have "version-def.h", and instead > injected the version via preprocessor directives. And here we would have > rebuilt all of `libgit.a` indeed in case the version changes, because > the preprocessor directive applied to all files. > > Stop building the separate library and instead add "version-def.h" to > the list of source files directly.
I'm happy to see this "optimazation" go. The solution using "version-def.h" seems simpler and more straightforward. Thanks!
-- Toon