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

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 13 14:08:33 PST 2018


phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.

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.


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

https://reviews.llvm.org/D55606





More information about the llvm-commits mailing list