Andarwinux wrote:

> > > I wonder if it would be less bug-prone in the long term to just build the 
> > > whole library with `-fexceptions` instead of trying to apply 
> > > `-fexceptions` to _just_ the right files at this point in time. Feels 
> > > like a brittle optimization for not much gain?
> > 
> > 
> > This will break MinGW LTO libunwind.
> 
> Can you clarify how?

Maybe this is a hidden bug, but I haven't investigated it too deeply, @mstorsjo 
may know better.
If you build MinGW LTO libunwind without `-fno-exceptions` or with 
-`fexceptions`, libunwind references `__gcc_personality_seh0`, which results in 
undefined symbols. cmake normally adds `-fno-exceptionson`, but not on the 
first build, because the toolchain is incomplete which causes cmake to think 
that the compiler doesn't support `-fno-exceptions`, which is how I found out 
about the problem.

https://github.com/llvm/llvm-project/pull/121819
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to