[CMake] build-webkit should be able to enable address sanitizer
[WebKit-https.git] / Tools / Scripts / webkitdirs.pm
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()) {