[linux] library=shared_library is dead, long live components=shared_library

7 views
Skip to first unread message

Evan Martin

unread,
May 23, 2011, 12:57:31 PM5/23/11
to chromium-dev
From IRC it sounds like some people haven't seen my previous messages
to chromium-dev, so just to say it explicitly:

1) library=shared_library is broken and will never work again (in
fact, it is ignored by our current build files)
2) components=shared_library is a similar but different build configuration
3) the buildbot has been swapped:
http://build.chromium.org/p/chromium/builders/Linux%20Builder%20%28dbg%29%28cmp%29

The docs have been updated:
http://code.google.com/p/chromium/wiki/LinuxFasterBuilds#Shared_libraries_(components)

There's more discussion in my previous post:
http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/1270aee0f91d2aa1/83afc2c8919c7eb6

If you encounter problems, please email me or open bugs.

Antony Sargent

unread,
May 23, 2011, 1:51:49 PM5/23/11
to Evan Martin, chromium-dev
I assume you meant "component=shared_library" ? In your message you have "components=shared_library", but the docs say "component=shared_library" which I think is what I've been using. 



--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-dev

Evan Martin

unread,
May 23, 2011, 1:56:40 PM5/23/11
to Antony Sargent, chromium-dev
Yes, thanks. Sorry for the typo. :(

The docs I linked to are correct at least!

Dominic Hamon

unread,
May 23, 2011, 1:57:54 PM5/23/11
to asargen...@google.com, Evan Martin, chromium-dev
Note also that components=shared_library will fail silently and leave you with a static library build. I have entered a bug for this (hoping that we can get gyp to error on unexpected defines).

On Mon, May 23, 2011 at 10:51 AM, Antony Sargent <asar...@chromium.org> wrote:

Dominic Battre

unread,
May 23, 2011, 4:44:20 PM5/23/11
to domi...@chromium.org, asargen...@google.com, Evan Martin, chromium-dev
Hi,

a quick question regarding the expected compile+link time (sorry if I missed this in previous discussions): Is the new solution supposed to be similarly fast as the previous solution?

The previous approach was so fast that I used to always make all targets. This took <1 minute (not measured) for compile and link everything after touching a file in browser/.

After changing to component=shared_library, calling "make" is significantly slower. I just touched a profile_impl.cc which caused no noticeable recompiling but 5m30sec of linking (23 files, mainly tests) and writing 9 GB of files to disk.

Best regards,
Dominic
Dominic Battré | Software Engineer | bat...@google.com | +49 (0) 89 - 83 930 9152

Evan Martin

unread,
May 23, 2011, 4:48:21 PM5/23/11
to Dominic Battre, domi...@chromium.org, asargen...@google.com, chromium-dev
On Mon, May 23, 2011 at 1:44 PM, Dominic Battre <bat...@chromium.org> wrote:
> a quick question regarding the expected compile+link time (sorry if I missed
> this in previous discussions): Is the new solution supposed to be similarly
> fast as the previous solution?

In the limit, it ought to be faster, but currently it is much heavier.

> The previous approach was so fast that I used to always make all targets.
> This took <1 minute (not measured) for compile and link everything after
> touching a file in browser/.
> After changing to component=shared_library, calling "make" is significantly
> slower. I just touched a profile_impl.cc which caused no noticeable
> recompiling but 5m30sec of linking (23 files, mainly tests) and writing 9 GB
> of files to disk.

In particular, files at the "top" of Chrome (that use many more of its
internal libraries) will be worse than those at the "bottom" (the
lower-level libraries). So net_unittests should be fast, while
ui_tests will be slow.

I am sorry I broke this. I was under the impression that very few
people used it, and also that it is frequently broken. I do believe
that we needed to get rid of it eventually -- it was costing many
people a persistent small cost while benefiting a few (like you,
apparently) a lot.

If you "make chrome" instead you should hopefully find a tolerable build time.

Mattias Nissler

unread,
May 24, 2011, 3:28:14 AM5/24/11
to Evan Martin, Dominic Battre, domi...@chromium.org, asargen...@google.com, chromium-dev
Just to add a data point: Most of the people in MUC around me (maybe around 10) used the shlib build and were mostly happy with it. Stability wasn't so much of an issue here after the shlib buildbot was introduced last year. That said, I understand that the shlib build was kind of a hack and agree we want to get rid of it.
 

If you "make chrome" instead you should hopefully find a tolerable build time.

--

Mattias Nissler

unread,
May 24, 2011, 4:24:51 AM5/24/11
to Evan Martin, Dominic Battre, domi...@chromium.org, asargen...@google.com, chromium-dev
On Tue, May 24, 2011 at 9:28 AM, Mattias Nissler <mnis...@chromium.org> wrote:


On Mon, May 23, 2011 at 10:48 PM, Evan Martin <ev...@chromium.org> wrote:
On Mon, May 23, 2011 at 1:44 PM, Dominic Battre <bat...@chromium.org> wrote:
> a quick question regarding the expected compile+link time (sorry if I missed
> this in previous discussions): Is the new solution supposed to be similarly
> fast as the previous solution?

In the limit, it ought to be faster, but currently it is much heavier.

> The previous approach was so fast that I used to always make all targets.
> This took <1 minute (not measured) for compile and link everything after
> touching a file in browser/.
> After changing to component=shared_library, calling "make" is significantly
> slower. I just touched a profile_impl.cc which caused no noticeable
> recompiling but 5m30sec of linking (23 files, mainly tests) and writing 9 GB
> of files to disk.

If you only make the chrome target, it's 75 seconds for me. IIRC, it was some 15 seconds with library=shared_library.

Mario Sanchez Prada

unread,
May 24, 2011, 4:27:09 AM5/24/11
to chromi...@chromium.org
On Mon, 2011-05-23 at 13:48 -0700, Evan Martin wrote:
> [....]

> If you "make chrome" instead you should hopefully find a tolerable build time.

Probably a stupid question but as I'm new here, I'll make it anyway...

Supposing all the needed libraries are up to date, wouldn't it be faster
just to do "make out/Debug/chrome"? As far as I understood it "make
chrome" will be faster than just make because it will only take into
account the needed dependencies to build chrome, while "make
out/Debug/chrome" will just build chrome, assuming everything else is
already up-to-date.

But perhaps I'm wrong in my assumptions... if so, a clarification would
be really appreciated :-)

Thanks!
Mario


Lei Zhang

unread,
May 24, 2011, 4:33:12 AM5/24/11
to msan...@igalia.com, Chromium-dev
From chrome.target.mk:

--
# Add target alias
.PHONY: chrome
chrome: $(builddir)/chrome
--

Where $(builddir) is out/Debug for debug builds.

Mario Sanchez Prada

unread,
May 24, 2011, 4:45:43 AM5/24/11
to chromi...@chromium.org
On Tue, 2011-05-24 at 01:33 -0700, Lei Zhang wrote:
> From chrome.target.mk:
>
> --
> # Add target alias
> .PHONY: chrome
> chrome: $(builddir)/chrome
> --
>
> Where $(builddir) is out/Debug for debug builds.

Oops! I should have "grepped" before asking.. :-)

Thanks for pointing it out anyway,
Mario

Chase Phillips

unread,
May 24, 2011, 10:15:10 AM5/24/11
to Evan Martin, chromium-dev
On Mon, May 23, 2011 at 9:57 AM, Evan Martin <ev...@chromium.org> wrote:
From IRC it sounds like some people haven't seen my previous messages
to chromium-dev, so just to say it explicitly:

1) library=shared_library is broken and will never work again (in
fact, it is ignored by our current build files)
2) components=shared_library is a similar but different build configuration
3) the buildbot has been swapped:
http://build.chromium.org/p/chromium/builders/Linux%20Builder%20%28dbg%29%28cmp%29



The docs have been updated:
http://code.google.com/p/chromium/wiki/LinuxFasterBuilds#Shared_libraries_(components)

There's more discussion in my previous post:
http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/1270aee0f91d2aa1/83afc2c8919c7eb6

If you encounter problems, please email me or open bugs.
Reply all
Reply to author
Forward
0 new messages