2

I am having very slow build time, each time I make any change to code. I tried building with timing summary and here is the report from Report Navigator-

enter image description here

CompileC with 409 tasks is taking 134.55 seconds which is understandable, but I am not sure what Ld (1 task) means, which is taking almost 2 minutes.

What it is? Why is it taking this much time? How can I improve it in terms of time?

Pankaj Dubey
  • 796
  • 3
  • 8
  • 32
  • Ld is the linker. It is taking all the object files compiled in the CompileC tasks and it is building them into one library that can be used by the application and touching up all the addresses across compile units so they know where the referenced functions are. It can take more or less time depending on how many compile units you have, what level of optimization you are using, how much RAM your computer has, what other tasks your computer is running at the time, and various other settings and reasons. – Durstann Aug 29 '20 at 06:39
  • Thank you @Durstann for you quick response. I was looking into apple's documentation. Is there any proper guide or documentation of it? I wanted to spend some time so that I can get a better idea of it. – Pankaj Dubey Aug 29 '20 at 16:02
  • you can have a look at `man ld` and see the various options there. As @Durstann mentioned, the excess time might be because of various reasons (are you building unwanted architectures?). Note that compile is taking 130 sec, and total time taken is 190 sec - So some linking happens in a parallel manner. – sudeepdino008 Aug 30 '20 at 15:23

0 Answers0