Rebuilding libxul made slightly easier, finally

One of the longstanding problems when modifying code in the mozilla code base, is that when you change some file under e.g. content/, and you don’t want to waste the whole lot of time it takes to run a complete make -f client.mk, you need to build under content/, then layout/build/, and finally toolkit/library/. And you need to remember that (or use tools that remember for you).

These days are finally over. After several attempts a year ago (!), and again several attempts during the past weeks, bug 644608 is finally on mozilla-central and is likely to stick, this time. There may be some corner cases, in which case please file bugs.

Anyways, Now, you just need to build under e.g. content/ and toolkit/library/. No need to rebuild layout/build/ anymore.

2012-04-12 19:41:53+0100

p.m.o

You can leave a response, or trackback from your own site.

6 Responses to “Rebuilding libxul made slightly easier, finally”

  1. glandium Says:

    In fact, in some cases, building in toolkit/library/ only is enough. It’s not the general case, though, and I don’t advise doing so.

  2. Dan Says:

    What is the difference in build times (say for a small change in one file) between this approach and running make -f client.mk?

  3. glandium Says:

    On my machine, it’s 15 seconds instead of more than a minute.

  4. Felipe Gomes Says:

    So the idea now is that you only need to rebuild the top-level folder + toolkit/library? Does it also work for the deps that are picked up by docshell/build?

  5. glandium Says:

    Felipe: you only need to rebuild the directory where you made your changes and toolkit/library. Provided your changes are in something that ends up in libxul.

  6. avih Says:

    I think this made partial builds quite a bit slower on Windows. Prior to this change, building layout/generic + layout/build + toolkit/library took about 10 seconds or less. Now building the same (with or without layout/build) takes 30s and more… (either way it rebuilds xul.lib).

Leave a Reply