I just enabled LLVM_ENABLE_EH and LLVM_ENABLE_RTTI for all my platforms due to compatibility issues on Linux and noticed a massive number of warnings from xlocal that /EHsc should be enabled. I traced this down to HandleLLVMOptions unconditionally removing all EH and RTTI flags on MSVC (lines 609-616) and llvm_update_compile_flags not adding them back. In other words, as of right now, these options are broken on MSVC. The attached patch adds the flags back as required.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lgtm
It's unfortunate that we have to globally remove /EHsc and /GR in HandleLLVMOptions just to avoid warnings, but I don't think we can avoid it.
Comment Actions
Ok, great, can you or someone else land the patch? I don't have commit rights.
Personally, I think the issue is that we have an option like LLVM_ENABLE_EH at all instead of respecting what the user sets via CMAKE_${LANG}_FLAGS, but that's a different discussion.