[cfe-dev] Choosing the unwinder / C++ low-level libraries in Clang

Jonathan Roelofs jonathan at codesourcery.com
Thu Jul 23 10:06:08 PDT 2015



On 7/23/15 10:58 AM, David Chisnall wrote:
> On 23 Jul 2015, at 17:48, Jonathan Roelofs <jonathan at codesourcery.com> wrote:
>>
>>>
>>> I thought the unwinder only used C++ features that didn’t depend on the C++ runtime library (no exceptions, no RTTI) and only depended on some header-only things from elsewhere?
>>
>> It does, but that wasn't the only layering violation. EHABI introduces a dependency in the wrong direction for some kinds of catch descriptors: https://github.com/llvm-mirror/libunwind/blob/master/src/Unwind-EHABI.cpp#L142
>
> That looks commented out - presumably it could be made a weak symbol and only used if a C++ runtime is linked in?

It is commented out to break the backward dependency. To clarify, where 
I referred to EHABI above, I was speaking to the spec, not our 
implementation of it.  We get away with not implementing all of it 
because Clang doesn't emit those kinds of descriptors.

A weak symbol would be a reasonable way to break the cycle if someone 
does want to implement it.


Jon

>
> David
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded




More information about the cfe-dev mailing list