addSamplingProfileGatherFlags is no longer needed

We already add the "-fdebug-info-for-profiling" flag globally by default.
Besides, Sampling PGO does not need additional target-specific build
flags, unlike instrumentation PGO.

This is preparation to separate out sampling pgo into a separate module.
NFCI.

Test: presubmit
Change-Id: Icb28a98c021a78db25d8cb5ca9694ed6b7367a8d
This commit is contained in:
Yi Kong
2021-12-06 15:43:06 +08:00
parent 0a84e93b7f
commit 5ded619f3e
3 changed files with 0 additions and 14 deletions

View File

@@ -96,10 +96,6 @@ func (props *PgoProperties) addInstrumentationProfileGatherFlags(ctx ModuleConte
flags.Local.LdFlags = append(flags.Local.LdFlags, profileInstrumentFlag)
return flags
}
func (props *PgoProperties) addSamplingProfileGatherFlags(ctx ModuleContext, flags Flags) Flags {
flags.Local.CFlags = append(flags.Local.CFlags, props.Pgo.Cflags...)
return flags
}
func (props *PgoProperties) getPgoProfileFile(ctx BaseModuleContext) android.OptionalPath {
profileFile := *props.Pgo.Profile_file
@@ -313,10 +309,6 @@ func (pgo *pgo) flags(ctx ModuleContext, flags Flags) Flags {
if (props.ShouldProfileModule && props.isInstrumentation()) || props.PgoInstrLink {
// Instrumentation PGO use and gather flags cannot coexist.
return props.addInstrumentationProfileGatherFlags(ctx, flags)
} else if props.ShouldProfileModule && props.isSampling() {
flags = props.addSamplingProfileGatherFlags(ctx, flags)
} else if ctx.DeviceConfig().SamplingPGO() {
flags = props.addSamplingProfileGatherFlags(ctx, flags)
}
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {