[PATCH] D55606: [gn build] Add infrastructure to create symlinks and use it to create lld's symlinks

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 13 16:17:00 PST 2018


thakis added a comment.

In D55606#1330404 <https://reviews.llvm.org/D55606#1330404>, @phosek wrote:

> One aspect of this change I'm not super excited about is the fact that it duplicates information from the toolchain, specifically the file extension. What's worse, people can override the `output_extension` on individual targets. `symlink_or_copy` would break in those cases (or if we change the default extension e.g. for a new toolchain). Unfortunately, handling this in a proper way is tricky. Changing the `link` tool to also create symlinks as you mentioned is the only way I could think of that avoids that duplication, but that's pretty ugly. Ideally, we would be able to use a `copy` target, but even that doesn't work since you still have to specify the source which has the same issue. So this change is LGTM as is, but I think this is something we should maybe raise on gn-dev as this is not the first time it came up.


That's a great point, thanks. I added a FIXME to the py script saying that this shouldn't look at the host os but the target os.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55606/new/

https://reviews.llvm.org/D55606





More information about the llvm-commits mailing list