[LLVMdev] LLVM_REQUIRES_EH

Dan Liew dan at su-root.co.uk
Fri Aug 15 00:10:43 PDT 2014


On 14 August 2014 23:33, Zachary Turner <zturner at google.com> wrote:
> Can anyone think of a good reason to keep this CMake variable around?
> AFAICT llvm should never need to be compiled with exception support, and the
> same applies for clang, lldb, lld, and all (?) other LLVM subprojects.

I looked at something related to this fairly recently.

The example in ``examples/ExceptionDemo/`` seems to require it.

Also these files also use it

lib/Transforms/Hello/CMakeLists.txt:  if( NOT LLVM_REQUIRES_EH )
tools/bugpoint-passes/CMakeLists.txt:  if( NOT LLVM_REQUIRES_EH )

I'm not entirely sure why though because I don't know what the export
files are for and why RTTI or EH changes anything about the exported
symbols.

Are you aware I recently added the ``LLVM_ENABLE_EH`` CMake option [1]
and that we actually export this information to clients of LLVM in
LLVMConfig.cmake (as ``LLVM_ENABLE_EH``, see [2])?

If you do decide to remove LLVM_REQUIRES_EH you need make sure that
LLVM_ENABLE_EH doesn't break.

[1] http://llvm.org/docs/CMake.html#frequently-used-cmake-variables
[2] http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project

Thanks,
Dan.



More information about the llvm-dev mailing list