Merge changes Ied8fd7b5,Ib0584545 into main am: 6c392749d5

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

Change-Id: Idad1a222c801795e19a99689f22116080bf04728
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Colin Cross
2024-02-05 23:53:52 +00:00
committed by Automerger Merge Worker
6 changed files with 82 additions and 168 deletions

View File

@@ -1469,18 +1469,18 @@ func (c *deviceConfig) PgoAdditionalProfileDirs() []string {
}
// AfdoProfile returns fully qualified path associated to the given module name
func (c *deviceConfig) AfdoProfile(name string) (*string, error) {
func (c *deviceConfig) AfdoProfile(name string) (string, error) {
for _, afdoProfile := range c.config.productVariables.AfdoProfiles {
split := strings.Split(afdoProfile, ":")
if len(split) != 3 {
return nil, fmt.Errorf("AFDO_PROFILES has invalid value: %s. "+
return "", fmt.Errorf("AFDO_PROFILES has invalid value: %s. "+
"The expected format is <module>:<fully-qualified-path-to-fdo_profile>", afdoProfile)
}
if split[0] == name {
return proptools.StringPtr(strings.Join([]string{split[1], split[2]}, ":")), nil
return strings.Join([]string{split[1], split[2]}, ":"), nil
}
}
return nil, nil
return "", nil
}
func (c *deviceConfig) VendorSepolicyDirs() []string {