Moving generic unwind code from libc++abi to compiler-rt?

Hi the list,

When Apple contributed the generic unwind code, it went in libc++abi, because libc++abi is a consumer of this code. On other platforms, however, that doesn't really make sense. The generic unwind code is... generic. It is used by other things such as the C unwinder in compiler-rt, the Objective-C unwinder in libobjc (in Darwin this uses libc++abi / libsupc++, but this is not the case on any other platform, where it uses the generic unwind code directly), and unwinders for other languages (e.g. Ada).

In gcc, the generic unwinder is in libgcc_s or libgcc_eh. Given that compiler-rt is where the rest of the libgcc*-replacement code goes, it seems to make more sense to put it there. Would there be any objection to this move? Is there a compelling reason for language-agnostic support code to be in the C++ language runtime?

David

This makes sense.

I’m building libcxx+libcxxabi with gcc unwind lib and not llvm unwind. I may (in the future) replace gcc unwind the llvm unwind and then it will be built with compiler-rt, where llvm unwind belongs.

Yaron