[PATCH][CMake] Fix PR14200, llvm-config output misses -fno-rtti

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 14:43:37 PDT 2015


Once we have the right solution, this should definitely go to the 3.7
branch.

I'm not sure this is the best way to get the compile flags though. CC-ing
Chris as he's probably the most immersed in this side of CMake at the
moment.

On Thu, Aug 13, 2015 at 9:55 AM Hans Wennborg <hans at chromium.org> wrote:

> On Sun, Aug 2, 2015 at 9:27 AM, David Wiberg <dwiberg at gmail.com> wrote:
> > Hi,
> >
> > I took a stab at solving PR14200. My CMake knowledge is low but I think
> the
> > solution is reasonable as it reuses the existing logic for setting flags.
>
> Alexey: you're a cmake wizard. Can you take a look at this?
>
> Chandler: you're the cmake owner. I'd like to merge this to 3.7 when
> it lands if that's OK.
>
> > Things worth noting during review:
> > - The change means that both RTTI and exception handling flags will be
> > reported by llvm-config.
> > - I'm creating a variable with the same name as a target property. I
> don't
> > know if this breaks any convention.
>
> I tried this locally, and the output of llvm-config --cxxflags changed
> from:
>
>   -I/work/llvm/include -I/work/llvm/build.release/include  -fPIC
> -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter
> -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic
> -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11
> -ffunction-sections -fdata-sections -O3   -D_GNU_SOURCE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>
> to:
>
>   -I/work/llvm/include -I/work/llvm/build.release/include  -fPIC
> -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter
> -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic
> -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11
> -ffunction-sections -fdata-sections -O3  -fno-exceptions -fno-rtti
> -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
> -D__STDC_LIMIT_MACROS
>
> which seems correct.
>
> Thanks,
> Hans
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150813/bc51ae34/attachment.html>


More information about the llvm-commits mailing list