[CMake] Support more clang and gcc sanitizers
authorchris.reid@sony.com <chris.reid@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 23:34:03 +0000 (23:34 +0000)
committerchris.reid@sony.com <chris.reid@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 23:34:03 +0000 (23:34 +0000)
commit15be59bafdeeab89800d990dd25e82dffb2176ea
tree617422b4c84fa33181a12d9774c1cc07a2360b79
parentddd84412e6ccddcfca361c8ccacf9a764343c94d
[CMake] Support more clang and gcc sanitizers
https://bugs.webkit.org/show_bug.cgi?id=195956

Reviewed by Michael Catanzaro.

.:

Add support to compile with undefined, thread, memory, and leak sanitizers in cmake.
Also add ubsan and asan support when compiling with clang-cl on WinCairo.
This changes ENABLE_ADDRESS_SANITIZER flag to a generic ENABLE_SANITIZERS
which takes a semicolon separated list of sanitizers to enable.
e.g. `-DENABLE_SANITIZERS=address;undefined`

Building WinCairo with sanitizers enabled also needs CLANG_LIB_PATH set to the clang compiler runtime library folder.
e.g. pass `--cmakeargs="-DCLANG_LIB_PATH=\"C:\Program Files\LLVM\lib\clang\7.0.1\lib\windows\""` to build-webkit

* Source/cmake/WebKitCompilerFlags.cmake:

Tools:

* Scripts/webkitdirs.pm: Updating ENABLE_ADDRESS_SANITIZER to ENABLE_SANITIZERS=address

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Source/cmake/WebKitCompilerFlags.cmake
Tools/ChangeLog
Tools/Scripts/webkitdirs.pm