diff options
author | 2021-05-07 00:10:33 +0100 | |
---|---|---|
committer | 2021-05-20 20:06:03 +0100 | |
commit | 8fab6f86af918c37592a51aed09a05e09e1172e9 (patch) | |
tree | 3ce62f4fbb3eadb7f9ed3d37bc8aeb7f3473e6e5 /java/bootclasspath_fragment.go | |
parent | ecf2dc4614aaacd9c2f7e2ffbd790903db07f0af (diff) |
Populate individual classpath_fragments' classpaths.proto configs.
To avoid duplicates on *CLASSPATH environ variables at runtime, remove
split entries from platform-*classpath, i.e. all updatable jars that
have their own classpath fragments should not appear in the
platform-*classpath's classpaths.proto config.
Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: Id2759ab8e106cc183e695bf3509a6ab60ab0ef2a
Merged-In: Id2759ab8e106cc183e695bf3509a6ab60ab0ef2a
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r-- | java/bootclasspath_fragment.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 6b395fbf0..318ea441b 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -447,8 +447,16 @@ func (b *BootclasspathFragmentModule) generateClasspathProtoBuildActions(ctx and } func (b *BootclasspathFragmentModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList { - // TODO(satayev): populate with actual content - return android.EmptyConfiguredJarList() + if "art" == proptools.String(b.properties.Image_name) { + return b.getImageConfig(ctx).modules + } + + global := dexpreopt.GetGlobalConfig(ctx) + + // Only create configs for updatable boot jars. Non-updatable boot jars must be part of the + // platform_bootclasspath's classpath proto config to guarantee that they come before any + // updatable jars at runtime. + return global.UpdatableBootJars.Filter(b.properties.Contents) } func (b *BootclasspathFragmentModule) getImageConfig(ctx android.EarlyModuleContext) *bootImageConfig { |