Remove profilePathOnHost from bootImageConfig

The use of this field to return information from bootImageProfileRule
up the call stack to one of the users resulted in data races being
detected. This change simply returns the profile path back up the call
stack.

Bug: 245956352
Test: m nothing
      go test -race ./sdk/... -run TestSnapshotWithBootclasspathFragment_ImageName -test.count 100
      # Run the previous command without this change and sometimes it
      # shows the data race around profilePathOnHost. With this change
      # that data race is not reported. Although there is still another
      # data race.
Change-Id: I03b09e514cc94f2a6c9d5117d3b2f130cc2e4f5b
(cherry picked from commit 9f6ac0bb42)
Merged-In: I03b09e514cc94f2a6c9d5117d3b2f130cc2e4f5b
This commit is contained in:
Paul Duffin
2022-10-04 15:36:44 +01:00
committed by Cherrypicker Worker
parent 74920cf6ee
commit 5fe904240e
3 changed files with 42 additions and 33 deletions

View File

@@ -436,10 +436,10 @@ func (b *platformBootclasspathModule) generateBootImageBuildActions(ctx android.
profile := bootImageProfileRule(ctx, imageConfig)
// Build boot image files for the android variants.
androidBootImageFilesByArch := buildBootImageVariantsForAndroidOs(ctx, imageConfig, profile)
androidBootImageFiles := buildBootImageVariantsForAndroidOs(ctx, imageConfig, profile)
// Zip the android variant boot image files up.
buildBootImageZipInPredefinedLocation(ctx, imageConfig, androidBootImageFilesByArch)
buildBootImageZipInPredefinedLocation(ctx, imageConfig, androidBootImageFiles.byArch)
// Build boot image files for the host variants. There are use directly by ART host side tests.
buildBootImageVariantsForBuildOs(ctx, imageConfig, profile)