[PATCH] D135663: [libunwind] Install the headers by default

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 10:28:21 PDT 2023


ldionne added a comment.

In D135663#4332558 <https://reviews.llvm.org/D135663#4332558>, @barannikov88 wrote:

> The commit also says that there are no incompatibilities. May be it was true at that time,
> but the headers currently diverge. Even _Unwind_Exception definitions are different:

Hmm, yeah, I guess that was unavoidable and it's pretty bad.

> IMO clang's unwind.h should be as good as deleted.

FWIW that would also be my immediate reaction -- I'm not sure why it would make much sense for Clang to provide the header associated to another library.

> However, @aaron.ballman suggested on discord that it might be there for use with -ffreestanding. Can that make sense?

I am not sure why a freestanding implementation would require `<unwind.h>`, but if it does, then my reflex would be to say that it should get it from its unwinder library (aka `libunwind` or other). In my mind, freestanding is not the same as "no runtime libraries". If you are in freestanding and you still want exceptions, you'll need some unwind library to support that no matter what.

So naively, I'd be fine with removing the Clang version, but I wouldn't be surprised if there's a bunch of reasons why this can't work. If you want, you could create a review and we can have a discussion and ping the right people on it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135663/new/

https://reviews.llvm.org/D135663



More information about the llvm-commits mailing list