diff options
author | dsinclair <dsinclair@chromium.org> | 2017-01-24 11:18:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-24 11:18:17 -0800 |
commit | 6e162b54f708d7957c04d8dffce367fbeaa1a366 (patch) | |
tree | e83ae65808ba474bf512383d98fbe3d9dabc4066 /samples/BUILD.gn | |
parent | bea4330c8805b87dedb79d2c83443d15e3e068a2 (diff) | |
download | pdfium-6e162b54f708d7957c04d8dffce367fbeaa1a366.tar.xz |
Fixup coverage build
The original coverage CL made the unittests build correclty with coverage but
the code in samples/ builds differently. This CL fixes coverage for pdfium_diff
and pdfium_test code.
Review-Url: https://codereview.chromium.org/2649403003
Diffstat (limited to 'samples/BUILD.gn')
-rw-r--r-- | samples/BUILD.gn | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/samples/BUILD.gn b/samples/BUILD.gn index b4baf2b889..11bc9bab38 100644 --- a/samples/BUILD.gn +++ b/samples/BUILD.gn @@ -14,6 +14,8 @@ group("samples") { } config("pdfium_samples_config") { + cflags = [] + ldflags = [] defines = [ "PNG_PREFIX", "PNG_USE_READ_MACROS", @@ -28,6 +30,14 @@ config("pdfium_samples_config") { if (pdf_use_skia) { defines += [ "PDF_ENABLE_SKIA" ] } + if (use_coverage && is_clang) { + cflags += [ + "--coverage", + "-g", + "-O0", + ] + ldflags += [ "--coverage" ] + } } executable("pdfium_test") { |