[PATCH] D51440: [ToolChains] Link to compiler-rt with -L + -l when possible
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 30 01:55:12 PDT 2018
mstorsjo added a comment.
In https://reviews.llvm.org/D51440#1218817, @phosek wrote:
> What about other compiler-rt runtimes? Shouldn't we use the same approach for those?
Yes, I guess so.
> In case of multiarch runtime layout, we already add <https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChain.cpp#L82> the runtime directory to the new `LibraryPaths` list, which is added <https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChain.cpp#L771> to the list of library paths. We could consider doing the same for the default layout, in which case all `getCompilerRT` would need to return is the name of the library rather than a path, but we would need to use `-l` for all compiler-rt runtimes, not just builtins. That's going to require more changes, but I think it's going to result in a cleaner design.
Yes, so it sounds.
I'll see if I can get to looking at that sometime soon. I had this patch lying around as an attempt to work around the libtool issue in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 which doesn't seem to be going anywhere (and even if it did, it probably takes quite a bit of time before a new libtool release is made and it gets propagated to most places where I'd like to use this), and was curious if there was any specific reason for having this the way it was, or just the usual; historical reasons that it has started out like this and haven't had a need to change until now. If you otherwise would happen to be touching the same areas, feel free to pick it up ;-) otherwise I'll try to look at addressing your points in a few days.
Repository:
rC Clang
https://reviews.llvm.org/D51440
More information about the cfe-commits
mailing list