git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 18:05 UTC

Re: [PATCH 4/7] meson: use precompiled headers for unit tests

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 5, 2026, 10:24 UTC
Message-ID
<asN6-vOYWYtbiBFr@pks.im>
In-Reply-To
<eb0432fa-a595-4690-bf13-baffb306cc3a@gmail.com>
On Mon, Oct 05, 2026 at 03:04:16PM +0530, Kaartic Sivaraam wrote:
Show 21 quoted lines
> On 9/24/26 19:39, Patrick Steinhardt wrote:
> > 
> > diff --git a/t/meson.build b/t/meson.build
> > index 3ca7b27104..9f1ee9ad59 100644
> > --- a/t/meson.build
> > +++ b/t/meson.build
> > @@ -66,6 +65,13 @@ clar_unit_tests = executable('unit-tests',
> >     c_args: [
> >       '-DGIT_CLAR_DECLS_H="' + clar_decls_h.full_path() + '"',
> >     ],
> > +  c_pch: '../tools/precompiled.h',
> > +  link_with: static_library('clar',
> > +    sources: [
> > +      'unit-tests/clar/clar.c',
> > +      clar_suite_h,
> > +    ],
> > +  ),
> 
> Compiling this separately as a static library is cool but now clar.c does
> not get the libgit_c_args it was getting through the dependencies of  the
> unit-tests executable. Is this something that we need to correct?

That's true. But I wonder whether that is maybe even an improvement. After all, the libgit_c_args contain stuff that is relevant to Git, only. And given that "clar.c" is a vendored dependency, it does not really make sense to expose e.g. "-DWITH_BREAKING_CHANGES".

Now there are a small handful of arguments that _might_ be relevant, but these are only -W-style warning flags. I don't think we really care about those either, as again, this is a vendored dependency.

So overall I think that this is fine, but I should've maybe called this out in the commit mesage.

Patrick
Previous: Kaartic SivaraamNext: Patrick Steinhardt
Message 19 of 20 in “A couple of Meson improvements”
  1. 0/7 A couple of Meson improvementsPatrick Steinhardt, Sep 24, 2026
  2. 1/7 meson: avoid recompiling HTTP sources several timesPatrick Steinhardt, Sep 24, 2026
  3. 2/7 meson: don't recompile git-remote-http(1) multiple times for testsPatrick Steinhardt, Sep 24, 2026
  4. 3/7 meson: use precompiled headers for our test-helperPatrick Steinhardt, Sep 24, 2026
  5. 4/7 meson: use precompiled headers for unit testsPatrick Steinhardt, Sep 24, 2026
  6. 5/7 meson: fix outdated completion helpersPatrick Steinhardt, Sep 24, 2026
  7. 6/7 meson: update wrappersPatrick Steinhardt, Sep 24, 2026
  8. 7/7 gitlab-ci: fix hanging MSVC jobsPatrick Steinhardt, Sep 24, 2026
  9. Karthik NayakSep 30, 2026
  10. Karthik NayakSep 30, 2026
  11. Karthik NayakSep 30, 2026
  12. Karthik NayakSep 30, 2026
  13. Karthik NayakSep 30, 2026
  14. Patrick SteinhardtSep 30, 2026
  15. Kaartic SivaraamOct 5, 2026
  16. Kaartic SivaraamOct 5, 2026
  17. Kaartic SivaraamOct 5, 2026
  18. Kaartic SivaraamOct 5, 2026
  19. Patrick SteinhardtOct 5, 2026
  20. Patrick SteinhardtOct 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.