shutil.rmtree fails if asked to delete a single file, so change
build/config/ios/hardlink.py to use os.unlink/shutil.rmtree based
on the output type (directory, file, symlink, ...).
Bug: none
Change-Id: I861c215e91b455e5b24f8159e162f21644a4bd47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390183
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803861}
GitOrigin-RevId: af8f4f5d6065be3c60bb5a1b3ccefb94bea6493f