Merge "addSamplingProfileGatherFlags is no longer needed" am: b0d167cb43 am: 84afb3787b am: 8a98aff182

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908874

Change-Id: Id8e6c9021cbe08983932e0a4a0e0eae2cbed74aa
This commit is contained in:
Yi Kong
2021-12-07 05:17:51 +00:00
committed by Automerger Merge Worker
3 changed files with 0 additions and 14 deletions

View File

@@ -1194,10 +1194,6 @@ func (c *deviceConfig) DeviceKernelHeaderDirs() []string {
return c.config.productVariables.DeviceKernelHeaders return c.config.productVariables.DeviceKernelHeaders
} }
func (c *deviceConfig) SamplingPGO() bool {
return Bool(c.config.productVariables.SamplingPGO)
}
// JavaCoverageEnabledForPath returns whether Java code coverage is enabled for // JavaCoverageEnabledForPath returns whether Java code coverage is enabled for
// path. Coverage is enabled by default when the product variable // path. Coverage is enabled by default when the product variable
// JavaCoveragePaths is empty. If JavaCoveragePaths is not empty, coverage is // JavaCoveragePaths is empty. If JavaCoveragePaths is not empty, coverage is

View File

@@ -301,8 +301,6 @@ type productVariables struct {
ClangTidy *bool `json:",omitempty"` ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"` TidyChecks *string `json:",omitempty"`
SamplingPGO *bool `json:",omitempty"`
JavaCoveragePaths []string `json:",omitempty"` JavaCoveragePaths []string `json:",omitempty"`
JavaCoverageExcludePaths []string `json:",omitempty"` JavaCoverageExcludePaths []string `json:",omitempty"`

View File

@@ -96,10 +96,6 @@ func (props *PgoProperties) addInstrumentationProfileGatherFlags(ctx ModuleConte
flags.Local.LdFlags = append(flags.Local.LdFlags, profileInstrumentFlag) flags.Local.LdFlags = append(flags.Local.LdFlags, profileInstrumentFlag)
return flags 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 { func (props *PgoProperties) getPgoProfileFile(ctx BaseModuleContext) android.OptionalPath {
profileFile := *props.Pgo.Profile_file 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 { if (props.ShouldProfileModule && props.isInstrumentation()) || props.PgoInstrLink {
// Instrumentation PGO use and gather flags cannot coexist. // Instrumentation PGO use and gather flags cannot coexist.
return props.addInstrumentationProfileGatherFlags(ctx, flags) 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") { if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") {