With the introduction of Windows 10 on ARM comes the need to cross-
compile for it. The Chromium build regularly uses symlinks from the
target output directory to the host output directory to make this
happen.
This change adds no-escalation symlink-ish functionality for Windows to
the script that implements symlinking in the Chromium build. The
biggest caveat to this support is that files are hard-linked, so any
time that a symlink target is deleted and replaced without recreating
the symlink, hard links will be stale. This is acceptable because the
Chromium build system always re-makes links when the original changes.
Bug: 893460,927113
Change-Id: I451a4f353bf6bc976d244b3b08a09a646b278368
Reviewed-on: https://chromium-review.googlesource.com/c/1447251
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#629767}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c89a09ee36661ed82f87078009100b4739665fe4
The problem fixed by this patch is that this script always creates a link
to itself in the target location. That behavior was probably not intended
and caused problems when running this script several times with the same
target folder. Each run of this script would create one expected link and
one link to the script itself. Meaning that the need to use --force the
second time was needed to overwrite the "self-link" from the first run.
Even with --force there were issues if this script was run in parallel
since there can be a race condition in overwriting the "self-link".
Review URL: https://chromiumcodereview.appspot.com/16096006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@202661 4ff67af0-8c30-449e-8e8b-ad334ec8d88c