-
Edward Z. Yang authored
I noticed this bug when porting a (dead code) test case for new-build on executables to the new test suite; I noticed that if you do a fresh new-build on a project with lib and executable, specifying to only build the executable, AND the executable doesn't depend on the lib, new-build incorrectly decides to try to register the lib even though no lib was actually built. This is because "needs registration" was computed pre-pruning. I turned elabNeedsRegistration into a function that looks at the post-pruning elabBuildTargets to determine if we are actually going to build a library or not. This was actually a bit tricky (I introduced a regression) with regards to handling when there are NO targets. We have a regression test for this now. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
dd2731f6