Purpose of unwind.h in libunwind and clang Headers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Purpose of unwind.h in libunwind and clang Headers

Hans Wennborg via cfe-dev
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 include here: https://github.com/llvm/llvm-project/blob/8f3d47c54ac21f99b25d8ad00598b7f5be00d6d8/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?

Regards
Markus Böck

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Purpose of unwind.h in libunwind and clang Headers

Hans Wennborg via cfe-dev
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

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev