Be more conservative about which files are linked to the output dir. by ehuss · Pull Request #5460 · rust-lang/cargo (original) (raw)
Hm ok yeah it's definitely not worth this becoming a larger change.
So today the logic for "should I hardlink this up" is basically "am I a workspace member or am I a binary". That encompasses far too much as workspace member rlibs/rmeta have no business being linked up.
So this is instead saying that "if you were originally requested you're linked up". That includes libraries and rmeta business but you can't request more than one (even though we may compile many), so we should be resolving the race this way.
Writing this all down, I think the only difference is that all other workspace members aren't automatically linked up. I don't think, however, that it was possible for a workspace member to generate a relevant binary/staticlib for us to link upwards.
Or well, in other words, I think that this should be correct. I can't think of a way in which it would be wrong at least! In light of that I think we should be good to merge as soon as beta is branched.