Review Request 129708: C project also need Clang Sanitizer
Albert Astals Cid
aacid at kde.org
Thu Dec 29 17:08:01 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129708/#review101656
-----------------------------------------------------------
Ship it!
Maybe you can add a TODO to investigate it for gcc?
- Albert Astals Cid
On Dec. 29, 2016, 2:48 a.m., Leslie Zhai wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129708/
> -----------------------------------------------------------
>
> (Updated Dec. 29, 2016, 2:48 a.m.)
>
>
> Review request for Extra Cmake Modules and Alex Merry.
>
>
> Bugs: 374195
> http://bugs.kde.org/show_bug.cgi?id=374195
>
>
> Repository: extra-cmake-modules
>
>
> Description
> -------
>
> So I just added
>
> ```
> set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
> ```
>
> for C project to use Clang Sanitizer.
>
>
> Diffs
> -----
>
> modules/ECMEnableSanitizers.cmake 9c8a4de
>
> Diff: https://git.reviewboard.kde.org/r/129708/diff/
>
>
> Testing
> -------
>
> testcase for Clang Static Analyzer, and also for Clang Sanitizer https://github.com/LLVM-China/clang-analyzer.github.io/tree/master/tests
>
> ```
> cmake .. -DCMAKE_C_COMPILER=clang \
> -DCMAKE_CXX_COMPILER=clang++ \
> -DECM_ENABLE_SANITIZERS='address;leak;undefined' \
> -DCMAKE_BUILD_TYPE=Debug
> ```
>
> testcase for kcoreaddons and kjs with GNU compiler
>
> ```
> cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
> -DECM_ENABLE_SANITIZERS='address;leak;undefined' \
> -DKDE_INSTALL_LIBDIR=lib \
> -D_KDE4_DEFAULT_HOME_POSTFIX=4 \
> -DBUILD_TESTING=ON
> ```
>
> ```
> cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
> -DECM_ENABLE_SANITIZERS='address;leak;undefined' \
> -DKDE_INSTALL_LIBDIR=lib \
> -DBUILD_TESTING=ON
> ```
>
>
> Thanks,
>
> Leslie Zhai
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20161229/3ccc32d6/attachment.html>
More information about the Kde-buildsystem
mailing list