Merge "Sampling PGO deprecation" am: 3440d0d474 am: 7449127548 am: 768f69320f

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

Change-Id: I8e2d11431b439511dfb45268e16dd2e4372f8ccb
This commit is contained in:
Yi Kong
2022-01-26 06:45:48 +00:00
committed by Automerger Merge Worker

View File

@@ -208,6 +208,10 @@ func (props *PgoProperties) isPGO(ctx BaseModuleContext) bool {
ctx.ModuleErrorf("Instrumentation PGO specification is missing benchmark property")
}
if isSampling {
ctx.ModuleErrorf("Sampling PGO is deprecated, use AFDO instead")
}
if isSampling && isInstrumentation {
ctx.PropertyErrorf("pgo", "Exactly one of \"instrumentation\" and \"sampling\" properties must be set")
}