Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Issue 2841004: Use GNU ar's thin archive if this feature is available.... (Closed)

Created:
10 years, 6 months ago by hamaji
Modified:
9 years, 5 months ago
Reviewers:
TVL, Evan Martin
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Use GNU ar's thin archive if this feature is available. The thin archives don't have actual copy of object files. Instead, they have the paths to object files like symbolic links. With this option, ar and ranlib in chromium build become much faster on linux. Before this change: Total size of .a files: 1726537946 (1726M) ./ar.sh 8.73s user 12.28s system 26% cpu 1:19.24 total ./link.sh 9.14s user 4.54s system 14% cpu 1:36.01 total After this change: Total size of .a files: 43157870 (43M) ./ar.sh 7.77s user 1.75s system 97% cpu 9.797 total ./link.sh 9.10s user 5.26s system 21% cpu 1:06.18 total I'm not sure why link also becomes faster. Maybe other processes were running when I ran link.sh. The link.sh just links chrome and the ar.sh is generated by grepping our build process. The actual file is here: http://shinh.skr.jp/t/ar.sh.txt Unfortunately, this feature is relatively new (2008-03-27, http://sourceware.org/ml/binutils/2008-03/msg00150.html), so I think we cannot expect everyone have this feature. My tiny sed script detects if ar --help has the line like [T] - make a thin archive So, we won't use this option if we cannot find this line.

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -1 line) Patch
M pylib/gyp/generator/make.py View 1 2 4 chunks +32 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
hamaji
Hi Evan, I'm asking you to review this patch because IIRC you are the man ...
10 years, 6 months ago (2010-06-16 06:24:40 UTC) #1
hamaji
> Does the sed only work in English locale? Maybe better to run ar with ...
10 years, 6 months ago (2010-06-22 08:03:20 UTC) #2
Evan Martin
http://codereview.chromium.org/2841004/diff/3001/4001 File pylib/gyp/generator/make.py (right): http://codereview.chromium.org/2841004/diff/3001/4001#newcode126 pylib/gyp/generator/make.py:126: # We don't want to run the detection multiple ...
10 years, 6 months ago (2010-06-22 15:55:43 UTC) #3
hamaji
> I think as you've written it we'll do the above test every time you ...
10 years, 6 months ago (2010-06-23 07:59:59 UTC) #4
Evan Martin
Awesome! LGTM
10 years, 6 months ago (2010-06-23 14:44:10 UTC) #5
hamaji
On 2010/06/23 14:44:10, Evan Martin wrote: > Awesome! LGTM Thanks! Could you commit this on ...
10 years, 6 months ago (2010-06-23 15:08:07 UTC) #6
TVL
What happens in the builder/tester setup? The testers will download these binaries and not have ...
10 years, 6 months ago (2010-06-25 17:34:15 UTC) #7
Evan Martin
Build happens in three steps: .o => copied to .a => linked to executable The ...
10 years, 6 months ago (2010-06-25 17:36:41 UTC) #8
TVL
10 years, 6 months ago (2010-06-25 17:40:25 UTC) #9
On 2010/06/25 17:36:41, Evan Martin wrote:
> Build happens in three steps:
> .o => copied to .a => linked to executable
> The executable is what contains all the symbols etc needed for debugging. 
This
> patch just simplifies the .a files, which aren't part of the resulting build.

Ah ok.

Powered by Google App Engine
This is Rietveld 408576698