On Wednesday 2014-08-27 13:04 -0400, Zack Weinberg wrote: > 2a. I touched a C++ header file which is included all over the > place. I anticipate that this change will break a specific set of > .cpp files. Recompile *those files* right now. Do not recompile > anything else. Do not link. > > It is *often* the case that the set of .cpp files in question is > "all the files in this directory", but in my experience even that is > too many sometimes. For instance, if I'm adding a CSS feature and I > have to touch nsCSSValue.h, I probably want to iterate on > nsCSSParser.cpp and nsCSSValue.cpp until those are happy, and only > then try rebuilding the rest of layout/style/. In the days of |make > -f client.mk| I used to do this by copying compiler commands into a > shell window, and then iterating on <up-arrow><return>, but I don't > know how to get full compiler commands out of mach. (Grumble.)
Prior to unified builds, I'd use "make nsCSSParser.o" in objdir/layout/style. These days I can still use "make liblayout_style.a.desc" in objdir/layout/style/, and frequently do. I end up writing commands to build certain things first and then everything else (the binaries target) using && in the shell, and then using the shell's command history to repeat those commands. Something similar to Zack's (2a) is my main use case (except I don't particularly care about not rebuilding the other stuff; I just care about the rebuilding I want to happen first happening first so that I get the errors quickly). In most cases, though, it's the .cpp files that I've also touched that I want to rebuild first, so my prior suggestion of rebuilding "closer" dependencies (i.e., object files some of whose .cpp files have changed) before "further" dependencies (i.e., ones where there's one or more .h files in the dependency chain) addresses this. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: Digital signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform