summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn9
-rw-r--r--pdfium.gni3
2 files changed, 12 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index fbede10eb0..fccc6d7900 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -42,6 +42,7 @@ config("pdfium_common_config") {
config("pdfium_core_config") {
cflags = []
+ ldflags = []
configs = [ ":pdfium_common_config" ]
defines = [ "V8_DEPRECATION_WARNINGS" ]
if (is_linux) {
@@ -55,6 +56,14 @@ config("pdfium_core_config") {
if (is_win) {
cflags += [ "/wd4267" ]
}
+ if (use_coverage && is_clang) {
+ cflags += [
+ "--coverage",
+ "-g",
+ "-O0",
+ ]
+ ldflags += [ "--coverage" ]
+ }
}
config("xfa_warnings") {
diff --git a/pdfium.gni b/pdfium.gni
index df051eca81..5737224f70 100644
--- a/pdfium.gni
+++ b/pdfium.gni
@@ -28,4 +28,7 @@ declare_args() {
# Build PDFium standalone
pdf_is_standalone = false
+
+ # Enable coverage information
+ use_coverage = false
}