On 2014-04-29, 3:40 PM, Gabriele Svelto wrote:
On 29/04/2014 20:19, Ehsan Akhgari wrote:
See bug 942167 please. I don't really understand all of the intricacies
of how the b2g and gecko build systems talk to each other, but there is
some information in that bug which might be useful. (FWIW I have lost
all hope of getting the help that I need to bring unified builds to b2g,
so if you end up finishing that work, you will have my eternal
appreciation. :-)
I hope I will :) So today I tried reverting bug 942167 for b2g only but
that doesn't seem to be enough to get an unified build. Adding
'ac_add_options --enable-unified-compilation' to our default gecko
configuration in gonk-misc does the trick. This is obviously not the
right approach since unified compilation should be enabled by default
IIRC, but at least it's a starting point.
With unified compilation on I could get a working hamachi build (with
libxul.so ending up ~25MiB in size versus the ~26MiB we normally get)
but I haven't tried turning debugging on yet. I'll post further progress
on bug 950676 so for all those interested CC yourself on that bug.
Thanks a lot for working on this, Gabriele!
So the biggest issue here is to figure out how we can accept a parameter
into the build system to tell it what the default should be. One issue
is that unified compilation is really a hack designed to give you faster
builds, but those builds may sometimes be incorrect, because of things
such as macro definitions, function declaration/definitions etc.
crossing the translation unit boundaries. In the really pathological
case, this can hit us as runtime bugs (see bug 998742 which has been one
of the worst examples of this so far.)
So basically for desktop and Android builds, what we have done is turn
unified compilation on by default only for Nightly builds
(http://mxr.mozilla.org/mozilla-central/source/configure.in#3620) and
add periodic builds with custom mozconfigs such as
<http://mxr.mozilla.org/mozilla-central/source/browser/config/mozconfigs/linux64/nightly-nonunified>
to build the tree in non-unified mode to make sure that the builds still
work, etc.
The problem with b2g here is that I don't know what the right way of
introducing a setup like this would be. We need some kind of a toggle
which lets us turn unified builds on for developers by default, but also
have a way of turning them off on our builds on TBPL etc to do things
like periodic non-unified builds in order to detect the cases where
someone lands something which breaks non-unified builds. That way we'll
have the best of both worlds: faster builds for developers, but correct
builds for testing/shipping the products that we build.
I hope this is helpful background information. Please don't hesitate to
ping me if you run into any issues!
Cheers,
Ehsan
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g