Re: [PATCH] Makefile: let ccache cache objects built with the precompiled header
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