Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO"
This reverts commit 5010a97388
.
Reason for revert: b/166728338 - build failures on master branch
Bug: 162702246
Bug: 166728338
Change-Id: Ie9e51e7c5533d220ad3e160439cb38ff88f068ac
Test: TreeHugger
This commit is contained in:
parent
5010a97388
commit
988ff8d149
|
@ -290,16 +290,17 @@ func (pgo *pgo) flags(ctx ModuleContext, flags Flags) Flags {
|
||||||
|
|
||||||
// Add flags to profile this module based on its profile_kind
|
// Add flags to profile this module based on its profile_kind
|
||||||
if props.ShouldProfileModule && props.isInstrumentation() {
|
if props.ShouldProfileModule && props.isInstrumentation() {
|
||||||
|
props.addInstrumentationProfileGatherFlags(ctx, flags)
|
||||||
// Instrumentation PGO use and gather flags cannot coexist.
|
// Instrumentation PGO use and gather flags cannot coexist.
|
||||||
return props.addInstrumentationProfileGatherFlags(ctx, flags)
|
return flags
|
||||||
} else if props.ShouldProfileModule && props.isSampling() {
|
} else if props.ShouldProfileModule && props.isSampling() {
|
||||||
flags = props.addSamplingProfileGatherFlags(ctx, flags)
|
props.addSamplingProfileGatherFlags(ctx, flags)
|
||||||
} else if ctx.DeviceConfig().SamplingPGO() {
|
} else if ctx.DeviceConfig().SamplingPGO() {
|
||||||
flags = props.addSamplingProfileGatherFlags(ctx, flags)
|
props.addSamplingProfileGatherFlags(ctx, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {
|
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {
|
||||||
flags = props.addProfileUseFlags(ctx, flags)
|
props.addProfileUseFlags(ctx, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
return flags
|
return flags
|
||||||
|
|
Loading…
Reference in New Issue