[LLVMdev] LibUnwind into Compiler-RT?

Renato Golin renato.golin at linaro.org
Wed Oct 22 10:39:27 PDT 2014


So, I remember we discussed this earlier this year, but I can't find the thread.

The idea is to move libunwind into compiler-rt for the simple reasons below:

1. Unwinding is not exclusive to C++, nor exception handling.
2. Clang still includes libgcc_s and libgcc_eh when using compiler-rt
(maybe eh isn't needed, but it was there for libgcc).
3. Testing the libunwind with libc++ on ARM is not possible, because
libgcc_s merges RT abi with unwind, duplicating the implementation of
some, but not all, unwind functions.

I'm not sure how the move would take place, but I remember most people
being in favour, so I'm expecting that someone already has a plan. :)

I'm guessing that the libgcc_eh EH functions are implemented in
libc++, while the libgcc_s unwind is in libc++abi. If not, we might
have a hard time linking them together independently.

We'd have to be sure to move the tests as well, which could be the
hardest part, since all libc++ unwind-depending tests would have to
either be moved or rely on implicit dependencies.

An alternative to fix the libc++ tests on ARM would be to require
Compiler-RT to be there as well, but, as I said, Clang links gcc_eh
and gcc_s when you choose --rtlib=compiler-rt, making the exercise
moot.

Or we could just say that libc++ *needs* compiler-RT and call it a day.

Ideas?

cheers,
--renato



More information about the llvm-dev mailing list