vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
425 stars 41 forks source link

Decrease compilation time for updated packages #207

Open Le-Kat opened 1 year ago

Le-Kat commented 1 year ago

Since rua copies all packages to the .cache dir for building, they're naturally deleted when it's done installing. This leads to updates of the same package recompiling everything from scratch, whereas merging from upstream and then compiling would get the latest version of the package and would only recompile the files that have changed.

Is there any chance that rua could try to preserve the compilation for future updates of the package? Or could it maby be a user option for all packages/per package to preserve the build dir once it's done?

cplir-c commented 4 months ago

In general, incremental compilation results in a less-optimized binary but faster build times. Usually it's used for developers rebuilding an application alot when working on it.

A more usual way you could achieve this would be to use ccache (or sccache) to cache file build objects depending on your language (C, C++, obj-C, obj-c++ for ccache, c/c++ or rust for sccache). Not sure about other languages.