Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2799)

Unified Diff: build/config/ios/BUILD.gn

Issue 2789433004: Add tools for code coverage support in iOS. (Closed)
Patch Set: Nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/config/ios/BUILD.gn
diff --git a/build/config/ios/BUILD.gn b/build/config/ios/BUILD.gn
index ec6b9e67bcfb5f1fa5a7acb1495f5d4e6d7d8ac7..8dca86227bac485cfac9ce7bb749613e055b2c07 100644
--- a/build/config/ios/BUILD.gn
+++ b/build/config/ios/BUILD.gn
@@ -65,6 +65,10 @@ config("runtime_library") {
cflags_cc = common_cc_flags
cflags_objcc = common_cc_flags
}
+
+ if (ios_enable_coverage) {
+ configs = [ ":enable_coverage" ]
+ }
}
config("ios_dynamic_flags") {
@@ -86,6 +90,16 @@ config("xctest_config") {
]
}
+# This enables support for LLVM code coverage. See
+# http://llvm.org/docs/CoverageMappingFormat.html.
+config("enable_coverage") {
+ cflags = [
+ "-fprofile-instr-generate",
+ "-fcoverage-mapping",
+ ]
+ ldflags = [ "-fprofile-instr-generate" ]
+}
+
group("xctest") {
public_configs = [ ":xctest_config" ]
}

Powered by Google App Engine
This is Rietveld 408576698