git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: let ccache cache objects built with the precompiled header

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Oct 27, 2026, 20:00 UTC
Message-ID
<CAHwyqnX3sR9YxfK3NtPxVgmTfzfbgXX2bzPKzGGAbfC9k1iF4A@mail.gmail.com>
In-Reply-To
<579C36BA-1418-4E15-9CA7-70C752A69FCE@gmail.com>
Show 13 quoted lines
> > @@ -2946,6 +2946,8 @@ $(PRECOMPILED_HEADER_GCH): %.gch: % GIT-CFLAGS $(missing_dep_dirs) $(missing_com
> > $(PRECOMPILED_HEADER_USERS): %.o: %.c $(PRECOMPILED_HEADER_GCH) GIT-CFLAGS $(missing_dep_dirs) $(missing_compdb_dir)
> >    $(QUIET_CC)$(CC) -o $*.o -c -include $(PRECOMPILED_HEADER) -Winvalid-pch $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
> >
> > +$(PRECOMPILED_HEADER_GCH) $(PRECOMPILED_HEADER_USERS): export CCACHE_SLOPPINESS += pch_defines,time_macros
> > +
>
> This is a little curious to me. I’m familiar with the GNU Make-ism
> to set variables for particular targets; how does the export work?
> Is it the same but with a propagation to the recipe processes?
>
> Would it be better (for some definition…) to put the export in the 2
> pre-compiled header recipes directly?
Yeah, that could be a good idea.
> And, what about Meson?
I think it's not touched by this? My goal is just to speed up my local builds.
Harald
Previous: Ben KnobleNext: D. Ben Knoble
Message 3 of 8 in “Makefile: let ccache cache objects built with the precompiled header”
  1. Makefile: let ccache cache objects built with the precompiled headerHarald Nordgren via GitGitGadget, Oct 27, 2026
  2. Ben KnobleOct 27, 2026
  3. Harald NordgrenOct 27, 2026
  4. D. Ben KnobleOct 27, 2026
  5. Patrick SteinhardtOct 28, 2026
  6. Harald NordgrenOct 28, 2026
  7. Harald NordgrenOct 30, 2026
  8. Makefile: let ccache cache objects built with the precompiled headerHarald Nordgren via GitGitGadget, Oct 29, 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.