[PATCH] Add LLVM_REQUIRES_EH and LLVM_REQUIRES_RTTI as options in CMake
dan at su-root.co.uk
Mon Jul 21 11:59:00 PDT 2014
On 21 July 2014 17:53, Brad King <brad.king at kitware.com> wrote:
> On 07/21/2014 11:53 AM, Dan Liew wrote:
>> +if(LLVM_ENABLE_EH AND NOT LLVM_ENABLE_RTTI)
>> + set(LLVM_ENABLE_RTTI ON CACHE BOOL "Enable run time type information" FORCE)
>> + message(WARNING "Exception handling requires RTTI. Enabling RTTI")
> I don't think we should force the option here. We don't know which
> option as set/unset by mistake. Also if the options are set wrong
> by a script the warning might go unnoticed and the build may do
> something not intended by the user.
That probably is the better thing to do. I did the forcing of RTTI
because that's what the Autoconf/Makefile build system effectively do
and because internally when LLVM_REQUIRE_EH is set LLVM_REQUIRE_RTTI
is also enabled for the particular target.
> Instead use message(FATAL_ERROR)
> and ask the user to fix one of the options.
Okay I'll fix the patch.
More information about the llvm-commits