[CMake] build-webkit should be able to enable address sanitizer
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Jun 2018 21:07:50 +0000 (21:07 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Jun 2018 21:07:50 +0000 (21:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187222

Reviewed by Daniel Bates.

If 'set-webkit-configuration --asan' has been run, then build-webkit should pass
-DENABLE_ADDRESS_SANITIZER=ON to CMake, so that it actually does something.

This also works for build-jsc.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233402 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitdirs.pm

index b07b6b4..c961a76 100644 (file)
@@ -1,3 +1,18 @@
+2018-06-30  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] build-webkit should be able to enable address sanitizer
+        https://bugs.webkit.org/show_bug.cgi?id=187222
+
+        Reviewed by Daniel Bates.
+
+        If 'set-webkit-configuration --asan' has been run, then build-webkit should pass
+        -DENABLE_ADDRESS_SANITIZER=ON to CMake, so that it actually does something.
+
+        This also works for build-jsc.
+
+        * Scripts/webkitdirs.pm:
+        (generateBuildSystemFromCMakeProject):
+
 2018-06-30  Thibault Saunier  <tsaunier@igalia.com>
 
         Make check_flatpak() not verbose when only trying to run command inside flatpak
index 8dadf43..88bf6d0 100755 (executable)
@@ -2252,6 +2252,8 @@ sub generateBuildSystemFromCMakeProject
         push @args, "-DCMAKE_BUILD_TYPE=Debug";
     }
 
+    push @args, "-DENABLE_ADDRESS_SANITIZER=ON" if asanIsEnabled();
+
     if ($willUseNinja) {
         push @args, "-G";
         if (canUseEclipseNinjaGenerator()) {