Merge "Revert "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO""" am: 4f78c512d4
am: 7daf77bbc6
am: d1eff8c1a6
am: a0435f1c0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1418988 Change-Id: I790d9f3baf434aadf8fed4f6c7bbec09640506ad
This commit is contained in:
@@ -290,17 +290,16 @@ 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 flags
|
return props.addInstrumentationProfileGatherFlags(ctx, flags)
|
||||||
} else if props.ShouldProfileModule && props.isSampling() {
|
} else if props.ShouldProfileModule && props.isSampling() {
|
||||||
props.addSamplingProfileGatherFlags(ctx, flags)
|
flags = props.addSamplingProfileGatherFlags(ctx, flags)
|
||||||
} else if ctx.DeviceConfig().SamplingPGO() {
|
} else if ctx.DeviceConfig().SamplingPGO() {
|
||||||
props.addSamplingProfileGatherFlags(ctx, flags)
|
flags = props.addSamplingProfileGatherFlags(ctx, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {
|
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {
|
||||||
props.addProfileUseFlags(ctx, flags)
|
flags = props.addProfileUseFlags(ctx, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
return flags
|
return flags
|
||||||
|
Reference in New Issue
Block a user