This is an archive of the discontinued LLVM Phabricator instance.

[tools] Add option to create binutils symlinks
ClosedPublic

Authored by smeenai on Nov 2 2017, 12:10 AM.

Details

Summary

The LLVM tools can be used as a replacement for binutils, in which case
it's convenient to create symlinks with the binutils names. Add support
for these symlinks in the build system. As with any other llvm tool
symlinks, the user can limit the installed symlinks by only adding the
desired ones to LLVM_TOOLCHAIN_TOOLS.

I'm not the biggest fan of the name LLVM_CREATE_BINUTILS_SYMLINKS, but
it's the best one that came to mind right now. Better name suggestions
would be appreciated.

Event Timeline

smeenai created this revision.Nov 2 2017, 12:10 AM

@jakehehrlich I see you got that Herald rule set up :)

compnerd requested changes to this revision.Nov 2 2017, 1:30 PM

I like where this is going, but I think that we want this to be done via an option in the top-level CMakeLists.txt similar to things like LLVM_INSTALL_UTILS.

This revision now requires changes to proceed.Nov 2 2017, 1:30 PM
smeenai updated this revision to Diff 121365.Nov 2 2017, 1:45 PM
smeenai edited edge metadata.

Add option and documentation

I'm wondering if LLVM_INSTALL_BINUTILS_SYMLINKS would be a better name. I went with "create" instead of "install" initially because this option will create the symlinks in the build tree in addition to the install tree, and "install" doesn't convey that fully, but I think most people would care a lot more about the installation part.

compnerd accepted this revision.Nov 2 2017, 2:33 PM

Yeah, I think that INSTALL is a better verb here than CREATE. LG w/ s/CREATE/INSTALL/.

This revision is now accepted and ready to land.Nov 2 2017, 2:33 PM
smeenai updated this revision to Diff 121386.Nov 2 2017, 2:42 PM

Rename from CREATE to INSTALL

This revision was automatically updated to reflect the committed changes.