Review Request 112137: Move the clang compiler definitions to a separate block.

Raphael Kubo da Costa rakuco at FreeBSD.org
Sat Aug 17 23:37:55 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112137/
-----------------------------------------------------------

Review request for Build System and Alexander Neundorf.


Description
-------

Sharing compiler settings between GCC and clang does not always work: there
are flags (such as "-fno-check-new" or "-fno-reorder-blocks") that are
specific to GCC, and nothing stops these incompatibilities from becoming
bigger in the future.

Conversely, a separate clang block allows us to pass some additional flags
to clang that would have required yet another if() in the GCC block:

 o -fdelayed-template-parsing, needed for clang not to complain when we
   build with exceptions disabled and include code that throws exceptions in
   template code we do not instantiate.

 o -Wno-return-type-c-linkage, needed at least in kdepim because one of its
   plugins exports a function with C linkage that returns a QString.

Last but not least, checks for bad GCC allocators or support for some flags
which are always present in clang can be avoided altogether when we know the
compiler we are using.


This addresses bug 323579.
    http://bugs.kde.org/show_bug.cgi?id=323579


Diffs
-----

  cmake/modules/FindKDE4Internal.cmake 2449bf41785f76061447d48176dd11e9e7190a07 

Diff: http://git.reviewboard.kde.org/r/112137/diff/


Testing
-------

This is basically the upstreaming of what FreeBSD has been shipping locally for quite a while. I've also been using this to build KDE from git for many months without problems.


Thanks,

Raphael Kubo da Costa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20130817/fb66226b/attachment.html>


More information about the Kde-buildsystem mailing list