ClangBuiltLinux / boot-utils

Collection of files for booting Linux kernels
26 stars 7 forks source link

buildroot: Speed up build times #38

Closed nathanchance closed 3 years ago

nathanchance commented 3 years ago

Switch to prebuilt toolchains wherever possible and use ccache.

All of the individual commits should be self explanatory but heckle me as necessary :)

nickdesaulniers commented 3 years ago

I was thinking about this more overnight: does using ccache really speed up builds? I would expect to add to build time, unless you were to rebuild multiple images in repetition. Given how infrequently we update these, is it worth using ccache? Or does it somehow speed up the build regardless? I don't see how it would, unless some of the same code is being rebuilt for each image. Since we're cross compiling, I'd expect many cache misses even for the same source inputs.

nathanchance commented 3 years ago

Yes, as Dima said, we have always been using busybox's ash except for on PowerPC it seems. Unless you were manually running bash after getting into the machine, there will be no visible difference.

Well, the prebuilt toolchains are infrequently updated so they should have some cache hits and the cache location is in ${HOME} so it cannot be accidentally deleted but it seems that at least for me, there is no visible generation of a cache. I will delete it from the configurations and force push here shortly.

nathanchance commented 3 years ago

Alright, should be good, PTAL.