Faster rebuild when interfaces unchanged
Currently when debugging it can be common to modify code and recompile. This can be quite slow due to ‘dependency cascades’ – we may have to recompile lots of dependent files even if the public interfaces are unchanged.
If one simply excludes the dependencies specified in Makefile.depend for the object files but retains the *_mod
dependencies (which describe which objects an executable needs) then we will end up recompiling just those source files which have changed and then relinking. This can save a lot of time.
The Makefile.depend file is split into two sections, with the second section containing the object dependencies. It should be simple to get our dependency generator to wrap this second section in an if block so that we could do something like
make JUST_RELINK=on -j gs2
to exclude the dependencies and get a much faster rebuild.
Comments (3)
-
reporter -
reporter -
reporter - changed status to resolved
Implemented in PR #662
- Log in to comment
Any thoughts @Peter Hill ?