RFE: defer dependency generation to speed end-user builds

Issue #374 new
Paul Hargrove created an issue

As noted in (merged) pull request 217, there is now a possibility to speed the user-facing make all step by NOT generating dependency tracking files on the first compile of a given source file (which is the only build for a typical end-user).

The proposed logic is roughly:

if  [[ ! -e foo.o && ! -e foo.d ]] ; then
     build foo.o from foo.cpp
     do not generate foo.d (yet)
else
     make foo.d
     rebuild foo.cpp IF-AND-ONLY-IF foo.d is newer than foo.o
fi

The current logic in develop behaves equivalently to the else body.
So, in theory, implementing this RFE consists of adding/modifying logic to behave differently for the case in which the object and dependency files are both missing (aka "first build"). The actual embodiment, however, is probably not going to look like the pseudo-code shown above.

If implemented as expressed in the psuedo-code, this has the unfortunate property that the second make by a developer is going to consider all object files out-of-date due to the new-born dependency files. I believe it is possible to avoid that via additional logic which makes the 2nd build different from the 3rd and subsequent ones. However, that is currently a "second-order RFE" in my mind. If I've not changed my mind on that point if/when this reaches PR, then others will have the opportunity then to argue otherwise.

Comments (6)

  1. Log in to comment