On 2015/04/28 23:30, Toan Pham wrote:
Linking is a process of resolving symbols from object files with
external libraries, and it should not take that long.  When you have a
chance, try to compile the project under a ram filesystem like tmpfs.
I use it most of the time, even when I have an SSD drive.  The tmpfs
will speed up compilation significantly.


With full debug build of thunderbird (without -gsplit-dwarf), I think
libxul.so becomes close to 1GB in size.
So creating it puts much workload in terms of I/O, and
in terms of memory pressure, too, since ordinary linker's data structure to handle the large number of symbols simply runs out of 32-bit memory space during linking.

Currently with -gsplit-dwarf,libxul. it is 357.2MB. It is rather large.

I may want to try to set aside 2GB of RAM to tmpfs given this size of libxul.so, but as of now, linking libxul runs in a reasonable time by using GNU gold linker and -gsplit-dwarf option to GCC.

Thank you for the suggestion, if something goes wrong with
linking/build I may try to create a large tmpfs using RAM.

At the same time, I have to report that I monitor the memory usage during build, and saw most of memory is used as cache/buffer during linking. Hence I am not sure if tmpfs based on RAM will bring about much speedup in my environment. My CPU is probably 1 ~ 1.5 generation behind the latest one. That may explain the slow speed.

TIA


_______________________________________________
dev-builds mailing list
dev-builds@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to