summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-05-12 13:49:19 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-05-12 13:49:19 +0000
commita0a45671a680944d4f45a8f47a9307424b7ca63e (patch)
treeacff01cb4973d47899685e18ff955982b56e5b76 /java/bootclasspath_fragment.go
parentb98da74c1b5f67b0cca16dfdddca6a5d8de10718 (diff)
parent5f5a17fd6b7ea404d9df2f31f2d074586b086326 (diff)
Dexpreopt ART jars and framework jars together. am: 5f5a17fd6b
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/23208462 Change-Id: I1c51c5e667a485e3f2780354e4036990256d80e7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r--java/bootclasspath_fragment.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index f45165943..108fdd483 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -240,6 +240,9 @@ type BootclasspathFragmentModule struct {
// Collect the module directory for IDE info in java/jdeps.go.
modulePaths []string
+
+ // Path to the boot image profile.
+ profilePath android.Path
}
// commonBootclasspathFragment defines the methods that are implemented by both source and prebuilt
@@ -259,6 +262,12 @@ type commonBootclasspathFragment interface {
// If it could not create the files then it will return nil. Otherwise, it will return a map from
// android.ArchType to the predefined paths of the boot image files.
produceBootImageFiles(ctx android.ModuleContext, imageConfig *bootImageConfig) bootImageOutputs
+
+ // getImageName returns the `image_name` property of this fragment.
+ getImageName() *string
+
+ // getProfilePath returns the path to the boot image profile.
+ getProfilePath() android.Path
}
var _ commonBootclasspathFragment = (*BootclasspathFragmentModule)(nil)
@@ -528,6 +537,7 @@ func (b *BootclasspathFragmentModule) GenerateAndroidBuildActions(ctx android.Mo
// Delegate the production of the boot image files to a module type specific method.
common := ctx.Module().(commonBootclasspathFragment)
bootImageFiles = common.produceBootImageFiles(ctx, imageConfig)
+ b.profilePath = bootImageFiles.profile
if shouldCopyBootFilesToPredefinedLocations(ctx, imageConfig) {
// Zip the boot image files up, if available. This will generate the zip file in a
@@ -911,6 +921,14 @@ func (b *BootclasspathFragmentModule) AndroidMkEntries() []android.AndroidMkEntr
return entriesList
}
+func (b *BootclasspathFragmentModule) getImageName() *string {
+ return b.properties.Image_name
+}
+
+func (b *BootclasspathFragmentModule) getProfilePath() android.Path {
+ return b.profilePath
+}
+
// Collect information for opening IDE project files in java/jdeps.go.
func (b *BootclasspathFragmentModule) IDEInfo(dpInfo *android.IdeInfo) {
dpInfo.Deps = append(dpInfo.Deps, b.properties.Contents...)
@@ -1207,6 +1225,14 @@ func (module *PrebuiltBootclasspathFragmentModule) produceBootImageFiles(ctx and
return buildBootImageVariantsForAndroidOs(ctx, imageConfig, profile)
}
+func (b *PrebuiltBootclasspathFragmentModule) getImageName() *string {
+ return b.properties.Image_name
+}
+
+func (b *PrebuiltBootclasspathFragmentModule) getProfilePath() android.Path {
+ return b.profilePath
+}
+
var _ commonBootclasspathFragment = (*PrebuiltBootclasspathFragmentModule)(nil)
// RequiredFilesFromPrebuiltApex returns the list of all files the prebuilt_bootclasspath_fragment