A variable should be added to copy() called should_follow_symlinks (default false). When set to true, if the platform/filesystem supports symlinks, and the source is a link, the destination file should be copied.
This is useful for this use case I encountered on this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1124968
CIPD has a cache of things it has downloaded. By default, CIPD symlinks the files into src (but has an option to copy as too). A gn copy() is set up with the source files as the symlinks and the outputs as the build directory. The files in the build directory should probably not be symlinks because they get packaged and shipped to swarming.
So either gn needs an option to follow the link or mb isolate should recognize when the source is a symlink and include that too.
Comment 1 by thomasanderson@chromium.org
, Jul 6