For new readers
----------------
Jumbo building is the Chromium implementation of "unity builds" where
source files are merged for drastically improved compilation times.
For all readers:
----------------
The official test bot is still pending so the feature is still default off
(can be enabled by setting use_jumbo_build = true in gn). There seems to
be some issue with local mac builds (
https://crbug.com/716395 ) but I
think Linux and Windows work fine.
Official Jumbo documentation:
https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md
For old readers:
----------------
Since the last mail 10 days ago only core_generated has been added to
jumbo builds on master. I haven't measured but that is a smallish target
so it will only have saved 10 CPU minutes at most (out of 1000-2000 in the
test configuration).
Some major targets are in the pipeline though: blink/modules (saving 60
CPU minutes), blink/core unit_tests (saving 59 CPU minutes), blink/modules
unit_tests (saving 19 CPU minutes) and blink/platform (saving 35 CPU
minutes).
HEADS UP
--------
To avoid having to exclude files and targets from jumbo compilation the
files in the target has to compile when they are in the same translation
unit. That means that names of functions, constants, classes must be
unique in the gn target. This includes symbols in anonymous namespaces and
static functions because the translation unit will no longer contain just
one file.
Just to illustrate:
mycode/A.cpp
-----------------
#define Y Z
namespace { enum X { a, b }; }
static int Y() { return 1; }
mycode/B.cpp
-----------------
#define Y Z
namespace { enum X { a, b }; }
static int Y() { return 2;}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NOT JUMBO COMPATIBLE if A.cpp and B.cpp are in the same target!
Most code use unique names so this does not matter a lot, but tests have
turned out to be an exception. Thanks for all the people that have
reviewed my renaming and general clean up of unit tests during the last
week!
Official Jumbo documentation:
https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md
The attached image illustrates the state of my local work branch as some
kind of indication of what can be achieved (ignore the grey part).
/Daniel
P.S. Did I mention that I'm looking for volunteers, especially someone on
Mac? D.S.
--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */