Add EMMA_INSTRUMENT_STATIC support

Add jacocoagent when instrumenting with EMMA_INSTRUMENT_STATIC.

Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true
Change-Id: I451bb9d16b7f0a66fd06c2da576062b28830e470
This commit is contained in:
Colin Cross
2018-01-03 15:06:47 -08:00
parent e7fa3b1b74
commit 3144dfc966
2 changed files with 20 additions and 1 deletions

View File

@@ -185,6 +185,11 @@ func (j *Module) r8Flags(ctx android.ModuleContext, flags javaBuilderFlags) (r8F
android.PathForSource(ctx, "build/make/core/proguard.flags"),
}
if j.shouldInstrumentStatic(ctx) {
flagFiles = append(flagFiles,
android.PathForSource(ctx, "build/make/core/proguard.jacoco.flags"))
}
flagFiles = append(flagFiles, j.extraProguardFlagFiles...)
// TODO(ccross): static android library proguard files