[beta] When uplifting directories, symlink them instead of hard-link them.
Backport of #4672 to 1.22 (cargo 0.23)
The current stable RC (
cee38cd30) contains #4616 *but not* #4672. Without the latter it is known to cause #4671 on APFS (enabled by default on macOS 10.13 "High Sierra").
The issue was found by kpy3 on https://internals.rust-lang.org/t/rust-1-22-0-prerelease-testing/6282/2.