[LLVMdev] LibUnwind into Compiler-RT?
renato.golin at linaro.org
Thu Oct 23 04:18:41 PDT 2014
On 23 October 2014 03:11, Nick Kledzik <kledzik at apple.com> wrote:
> The only idea I heard back when this was previously discussed would be
> to put all of compiler-rt, libunwind, and libc++abi into one project with
> platform specific build rules to pull the right mix of code into the right
> libraries for each platform.
This would be a build nightmare, but if people more familiar with
CMake are comfortable, I'm ok with it.
> I do know that libunwind is API compatible with libgcc_s but uses different
> data structure layouts, so the two are not ABI compatible. That means
> in any process all the unwinding APIs have to come one or the other - no mixing.
I didn't mean mixing unwind libraries themselves, but mixing libgcc +
libunwind or compiler-rt + libgcc_s or compiler-rt + libunwind.
The problem is that libgcc_s contains some, but not all, of the unwind
routines, in addition to RT calls (such as hardware divide, etc). For
that reason, libunwind cannot be linked with libgcc without libgcc_s
on ARM. Also, libgcc_eh has the rest of the unwinding functions for
C++, which is more in line with libc++, not libunwind or libc++abi.
Is there any case where people use libc++ with libgcc? Or are all
toolchains using compiler-rt? I can do that, at least on ARM, so that
we avoid any code movement for the time being. I don't *need* to use
libgcc at all, I'm just trying to figure out the best way to do things
More information about the llvm-dev