[cfe-dev] Purpose of unwind.h in libunwind and clang Headers
Martin Storsjö via cfe-dev
cfe-dev at lists.llvm.org
Mon Jan 27 04:46:21 PST 2020
On Mon, 27 Jan 2020, Markus Böck via cfe-dev wrote:
> Hello everyone!
> I am wondering what the purpose of having both unwind.h in libunwind and the
> clang Headers is. I see that they have quite a lot but not fully equal
> declarations. I am asking because currently I am running into issues
> building libc++abi with llvm libunwind support on Windows as the includehere: https://github.com/llvm/llvm-project/blob/8f3d47c54ac21f99b25d8ad0059
> 8b7f5be00d6d8/libcxxabi/src/cxa_personality.cpp#L23 includes the libunwind
> unwind.h instead of the one from the clang resource folder. This leads to a
> build failure as _Unwind_Personality_Fn used below is not defined in llvm
> libunwind.
>
> Would fixing this just require fixing the include paths in cmake or is the
> problem somewhere deeper?
I believe they are supposed to be mostly interchangeable (probably with
nontrivial historic reasons to why there's two different similar files),
so in this case the exising __personality_routine typedef in libunwind's
unwind.h could be typedeffed to the _Unwind_Personality_Fn name as well.
// Martin
More information about the cfe-dev
mailing list