Merge "[pgo] Return updated Flags after adding flags for PGO/AFDO" am: 1fde95ac3f
am: b2403bc2f7
am: 1e88888c83
am: 9f145eb500
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1414408 Change-Id: Ib8eeee451d423474e7d54b0b3e77f3bb78c77673
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
|
||||
if props.ShouldProfileModule && props.isInstrumentation() {
|
||||
props.addInstrumentationProfileGatherFlags(ctx, flags)
|
||||
// Instrumentation PGO use and gather flags cannot coexist.
|
||||
return flags
|
||||
return props.addInstrumentationProfileGatherFlags(ctx, flags)
|
||||
} else if props.ShouldProfileModule && props.isSampling() {
|
||||
props.addSamplingProfileGatherFlags(ctx, flags)
|
||||
flags = props.addSamplingProfileGatherFlags(ctx, flags)
|
||||
} else if ctx.DeviceConfig().SamplingPGO() {
|
||||
props.addSamplingProfileGatherFlags(ctx, flags)
|
||||
flags = props.addSamplingProfileGatherFlags(ctx, flags)
|
||||
}
|
||||
|
||||
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {
|
||||
props.addProfileUseFlags(ctx, flags)
|
||||
flags = props.addProfileUseFlags(ctx, flags)
|
||||
}
|
||||
|
||||
return flags
|
||||
|
Reference in New Issue
Block a user