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

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

Issue 2789433004: Add tools for code coverage support in iOS. (Closed)
Patch Set: Rebased Created 3 years, 7 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
« no previous file with comments | « base/test/test_support_ios.mm ('k') | build/config/ios/ios_sdk.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/BUILD.gn
diff --git a/build/config/ios/BUILD.gn b/build/config/ios/BUILD.gn
index 71f87de3ff914a0112b14dcf86933f1842b5fcf1..f8091d155b05006e774caf5773ed82c091c401c0 100644
--- a/build/config/ios/BUILD.gn
+++ b/build/config/ios/BUILD.gn
@@ -112,6 +112,10 @@ config("runtime_library") {
cflags_cc = common_cc_flags
cflags_objcc = common_cc_flags
}
+
+ if (ios_enable_coverage) {
+ configs = [ ":enable_coverage" ]
+ }
}
config("ios_executable_flags") {
@@ -136,6 +140,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" ]
}
« no previous file with comments | « base/test/test_support_ios.mm ('k') | build/config/ios/ios_sdk.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698