diff options
author | 2021-05-07 00:10:33 +0100 | |
---|---|---|
committer | 2021-05-20 20:06:03 +0100 | |
commit | 8fab6f86af918c37592a51aed09a05e09e1172e9 (patch) | |
tree | 3ce62f4fbb3eadb7f9ed3d37bc8aeb7f3473e6e5 /java/dexpreopt_config.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/dexpreopt_config.go')
-rw-r--r-- | java/dexpreopt_config.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go index 37248609d..39a3e11a5 100644 --- a/java/dexpreopt_config.go +++ b/java/dexpreopt_config.go @@ -15,7 +15,6 @@ package java import ( - "fmt" "path/filepath" "strings" @@ -23,32 +22,6 @@ import ( "android/soong/dexpreopt" ) -// systemServerClasspath returns the on-device locations of the modules in the system server classpath. It is computed -// once the first time it is called for any ctx.Config(), and returns the same slice for all future calls with the same -// ctx.Config(). -func systemServerClasspath(ctx android.PathContext) []string { - return ctx.Config().OnceStringSlice(systemServerClasspathKey, func() []string { - global := dexpreopt.GetGlobalConfig(ctx) - var systemServerClasspathLocations []string - nonUpdatable := dexpreopt.NonUpdatableSystemServerJars(ctx, global) - // 1) Non-updatable jars. - for _, m := range nonUpdatable { - systemServerClasspathLocations = append(systemServerClasspathLocations, - filepath.Join("/system/framework", m+".jar")) - } - // 2) The jars that are from an updatable apex. - systemServerClasspathLocations = append(systemServerClasspathLocations, - global.UpdatableSystemServerJars.DevicePaths(ctx.Config(), android.Android)...) - - if expectedLen := global.SystemServerJars.Len() + global.UpdatableSystemServerJars.Len(); expectedLen != len(systemServerClasspathLocations) { - panic(fmt.Errorf("wrong number of system server jars, got %d, expected %d", len(systemServerClasspathLocations), expectedLen)) - } - return systemServerClasspathLocations - }) -} - -var systemServerClasspathKey = android.NewOnceKey("systemServerClasspath") - // dexpreoptTargets returns the list of targets that are relevant to dexpreopting, which excludes architectures // supported through native bridge. func dexpreoptTargets(ctx android.PathContext) []android.Target { |