Skip to content
Snippets Groups Projects
Commit dd2731f6 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Fix new-build exe target bug.


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: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent b6c6e884
No related branches found
No related tags found
No related merge requests found
Showing
with 120 additions and 13 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment