summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-05-10 18:38:34 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-05-11 19:04:17 +0100
commitc08c162b5a82ddfc44e9944d798636b2241308de (patch)
treec45d7ab59494cf0b013c3fdb44fa03c39d57326a /java/bootclasspath_fragment.go
parent09d88df0407263e846b01c226184b262f2e36678 (diff)
Dexpreopt ART jars and framework jars together.
Bug: 280776428 Test: atest art_standalone_dexpreopt_tests Test: - 1. m 2. Check .invocation file (http://gpaste/6498044089466880) 3. Check files in $ANDROID_PRODUCT_OUT/system/framework/x86_64 Test: - 1. m dist 2. Check files in out/dist/boot.zip Test: - 1. art/tools/buildbot-build.sh --host 2. m test-art-host-gtest 3. art/test/testrunner/testrunner.py --host Test: m build-art-target-golem Change-Id: I89490252e56a05edab03fdddc6539fa4d7f79756
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