I am building webkit ( 2 Million lines of code) after every ten minutes to see the output of my change in it, and linking of webkit on my Machine requires to process 600-700 MB of object files which are there on my hard-disk. That takes around 1.5 minutes. I want to speedup this linking process.
Is there any chance that, I can tell os to keep all the object files in RAM only ( I have 4 GB of ram ). Is there any other way to speed up the linking?
Any ideas or help is appreciated!
Here is a command which takes 1.5 minutes,
http://pastebin.com/GtaggkSc
I solved this problem by using tempfs and gold linker.
1). tmpfs: mount directory which contains all the object files as tmpfs.
2). gold linker: using gold linker will make linking 5-6 times fast, with tmpfs advantage speedup will be 7-8 times than normal linking. use following command on ubuntu and your normal linker will get replaced with Gold Linker.
sudo apt-get install binutils-gold
You can find some linking error using gold linker, below thread is a good help on it.
Replacing ld with gold - any experience?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With