[cfe-dev] JumboSupport: making unity builds easier in Clang

Jens Widell via cfe-dev cfe-dev at lists.llvm.org
Fri May 18 00:17:57 PDT 2018

Hi all,

I'd like to summarize this thread (so far) and try to agree on a way forward.

First, we had an interesting discussion on unity building in general,
or perhaps rather other, more "modern", ways to achieve the same or
similar effects. In the short term, this discussion is mostly
academic; the fact is that the Chromium project already has a unity
build configuration as described at the start of this thread, and it's
in "production" use. We're proposing these changes to Clang to reduce
an existing maintenance cost.

Second, we've had two principal proposed ways to support unity builds in Clang:

1) The "custom" but ultimately pretty trivial, in terms of changes to
the core Clang code, way implemented by my proof-of-concept patch.

2) An thus-far nowhere implemented way built on top of Clang's support
for C++ modules.

I'm not qualified to tell how much work (2) would be, how big the
changes to Clang would be, or how much of a maintenance burden this
would be on the Clang project, but it sounds more complicated to me,
so I'm inclined to think that (2) > (1) in all of those metrics.

I will also not be able to implement (2), because of the inevitably
limited nature of time.

So, if I don't receive push-back here (e.g. someone committing to work
on (2)), I'll proceed to submit patches for (1).


More information about the cfe-dev mailing list