[cfe-dev] RFC - Adding support for renaming clang via a CMake macro

Nemanja Ivanovic via cfe-dev cfe-dev at lists.llvm.org
Tue May 25 16:34:58 PDT 2021

I have just posted a draft patch (https://reviews.llvm.org/D103125) that
allows a user to rename the clang executable via a cmake macro.

This is presumably useful for vendors that provide a proprietary
clang/llvm-based compiler as well as the upstream clang on their platforms.
Having the compilers use different names makes it easier for users to
disambiguate which is which.

Of course, this can be accomplished by simply renaming the
binaries/symlinks after the build, but that has the drawback of tests,
utilities, etc. not knowing about the new name. Implementing this as a
cmake configuration allows for a standard way of doing this that can be
tested using upstream buildbots to prevent downstream breaks due to
upstream changes.

Furthermore, since the llvm-config utility knows the name/path of the clang
driver executable, build tools can easily learn to find anything that is
named based on the name of the clang driver (libraries, tools, etc.).

Please let me know what you think about this proposal either by responding
to this RFC or providing your feedback on the associated Phabricator review.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210525/ee8eeb5c/attachment.html>

More information about the cfe-dev mailing list