[PATCH] D25402: [Driver] Pass -lunwind when using libc++ + compiler-rt on Linux
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 24 06:27:24 PDT 2016
Hahnfeld added inline comments.
================
Comment at: lib/Driver/ToolChains.cpp:4704
+ GetRuntimeLibType(Args) == ToolChain::RLT_CompilerRT)
+ CmdArgs.push_back("-lunwind");
+}
----------------
mgorny wrote:
> Hahnfeld wrote:
> > mgorny wrote:
> > > Hahnfeld wrote:
> > > > As just written in D25008: This will probably result in problems if a system default `libunwind.so.8` is installed...
> > > I think this is the correct behavior in this case. Clang should work with whichever unwinder implementation is available, and if you want to change that, change the `libunwind.so` symlink.
> > >
> > > However, I don't really think it's a good idea to have both unwinder libraries installed alongside, especially that they are sharing the same name.
> > No, we can't: The nongnu libunwind is used by other system libraries that need and are tested against this version.
> >
> > It's certainly not a good idea, but it's reality in many distros. Most of them don't ship LLVM's libunwind.
> Well, IMO only sane solution to the problem is to have LLVM's libunwind renamed. Otherwise, using the two libraries is going always to be an unreliable, awful hackery with high risk that someone will accidentally end up with wrong one or -- even worse -- both of them in the same executable.
Well, then the worse thing will happen with this patch if both libraries are installed...
https://reviews.llvm.org/D25402
More information about the cfe-commits
mailing list