diff options
| author | 2020-08-28 04:50:08 +0000 | |
|---|---|---|
| committer | 2020-08-28 04:50:08 +0000 | |
| commit | 1fde95ac3f1fced6436aa0e0dd2a91fbb6158393 (patch) | |
| tree | 4289649550dfc5f2fed52f438714db2b50d1e1f4 | |
| parent | 10a3873a80a43b7afcf3d4bef5457dbd05dfc38c (diff) | |
| parent | 5010a973880e0b8abef598cf4c0ca8de8add16fd (diff) | |
Merge "[pgo] Return updated Flags after adding flags for PGO/AFDO"
| -rw-r--r-- | cc/pgo.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |