[cfe-dev] Separate preprocess and compile: hack or feature?
Boris Kolpackov via cfe-dev
cfe-dev at lists.llvm.org
Fri May 12 05:53:02 PDT 2017
Hi David,
David Chisnall <David.Chisnall at cl.cam.ac.uk> writes:
> There are a couple of other interesting points in the design space. For
> builds without debug info, you can ship the preprocessed output and
> re-run it only if you get some compiler warnings. This has the nice
> effect that code that compiles without warnings will compile faster,
> which is a nice incentive.
Interesting idea though I believe one of the issues is that you no
longer get warnings if you compile the preprocessed output.
> The other is to run the preprocessor twice.
Not sure how this helps. Are you talking about discovering the
included header set and shipping it along the source (and somehow
recreating the filesystem hierarchy on the remote so that everything
gets included properly)?
> You might also look at the bmake meta mode work from Juniper, which
> uses a kernel module to track filesystem accesses to give a complete
> list of everything that a particular file depends on (including shared
> libraries linked into bits of the toolchain). A few people in the
> FreeBSD packaging team have been exploring using Capsicum to explicitly
> limit the files that the compiler can access and lazily pull them to
> the target system on demand (and to avoid accidental dependencies).
While interesting idea, all this will be very platform/compiler specific.
I am trying hard to avoid that.
Thanks,
Boris
More information about the cfe-dev
mailing list