Add a way to compute the code coverage of fuzzers
This also fixes bin/coverage.
fuzz/coverage borrows heavily from bin/coverage.
BUG=skia:
Change-Id: I9e353d1f5ea3bca1d57d66b1c1ecabc6f9b23cee
Reviewed-on: https://skia-review.googlesource.com/8414
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/bin/coverage b/bin/coverage
index 7390d7e..f7c2cf8 100755
--- a/bin/coverage
+++ b/bin/coverage
@@ -34,7 +34,7 @@
bin/fetch-gn
#TODO: make this work with Clang.
-ARGS='cc="gcc" cxx="g++" extra_cflags="--coverage" extra_ldflags="--coverage"'
+ARGS='cc="gcc" cxx="g++" extra_cflags=["--coverage"] extra_ldflags=["--coverage"]'
gn gen --args="$ARGS" "$BUILD"
ninja -C "$BUILD" "$EXECUTABLE"