Revert "Revert "Add a coverage suffix to avoid Ninja file regene..."
Revert submission 3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD
Reason for revert: Rolling forward with a fix
Adding a coverage suffix for product_config.go too:
FAILED: ninja: 'out/soong/soong.sdv_core_cf.extra.variables', needed by 'out/soong/.intermediates/build/soong/product_config/product_config.json', missing and no known rule to make it
03:42:23 ninja failed with: exit status 1
Reverted changes: /q/submissionid:3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD
Change-Id: I74d0e3fda09b1367f3dbb939d4f47c4d09b3d51f
diff --git a/android/config.go b/android/config.go
index d6d76a4..77c5b34 100644
--- a/android/config.go
+++ b/android/config.go
@@ -173,6 +173,13 @@
return c.IsEnvTrue("DISABLE_VERIFY_OVERLAPS") || c.ReleaseDisableVerifyOverlaps() || !c.ReleaseDefaultModuleBuildFromSource()
}
+func (c Config) CoverageSuffix() string {
+ if v := c.IsEnvTrue("EMMA_INSTRUMENT"); v {
+ return "coverage."
+ }
+ return ""
+}
+
// MaxPageSizeSupported returns the max page size supported by the device. This
// value will define the ELF segment alignment for binaries (executables and
// shared libraries).