DescriptionUse 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 : '' #Messages
Total messages: 9 (0 generated)
|