Loading dexpreopt/config.go +5 −3 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ type GlobalConfig struct { SystemServerJars []string // jars that form the system server SystemServerApps []string // apps that are loaded into system server UpdatableSystemServerJars []string // jars within apex that are loaded into system server SpeedApps []string // apps that should be speed optimized PreoptFlags []string // global dex2oat flags that should be used if no module-specific dex2oat flags are specified Loading Loading @@ -285,6 +286,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { ProductUpdatableBootLocations: nil, SystemServerJars: nil, SystemServerApps: nil, UpdatableSystemServerJars: nil, SpeedApps: nil, PreoptFlags: nil, DefaultCompilerFilter: "", Loading java/dexpreopt_config.go +16 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package java import ( "fmt" "path/filepath" "strings" Loading Loading @@ -65,6 +66,16 @@ func setDexpreoptTestGlobalConfig(config android.Config, globalConfig dexpreopt. var dexpreoptGlobalConfigKey = android.NewOnceKey("DexpreoptGlobalConfig") var dexpreoptTestGlobalConfigKey = android.NewOnceKey("TestDexpreoptGlobalConfig") // Expected format for apexJarValue = <apex name>:<jar name> func splitApexJarPair(apexJarValue string) (string, string) { var apexJarPair []string = strings.SplitN(apexJarValue, ":", 2) if apexJarPair == nil || len(apexJarPair) != 2 { panic(fmt.Errorf("malformed apexJarValue: %q, expected format: <apex>:<jar>", apexJarValue)) } return apexJarPair[0], apexJarPair[1] } // 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(). Loading @@ -77,6 +88,11 @@ func systemServerClasspath(ctx android.PathContext) []string { systemServerClasspathLocations = append(systemServerClasspathLocations, filepath.Join("/system/framework", m+".jar")) } for _, m := range global.UpdatableSystemServerJars { apex, jar := splitApexJarPair(m) systemServerClasspathLocations = append(systemServerClasspathLocations, filepath.Join("/apex", apex, "javalib", jar + ".jar")) } return systemServerClasspathLocations }) } Loading Loading
dexpreopt/config.go +5 −3 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ type GlobalConfig struct { SystemServerJars []string // jars that form the system server SystemServerApps []string // apps that are loaded into system server UpdatableSystemServerJars []string // jars within apex that are loaded into system server SpeedApps []string // apps that should be speed optimized PreoptFlags []string // global dex2oat flags that should be used if no module-specific dex2oat flags are specified Loading Loading @@ -285,6 +286,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { ProductUpdatableBootLocations: nil, SystemServerJars: nil, SystemServerApps: nil, UpdatableSystemServerJars: nil, SpeedApps: nil, PreoptFlags: nil, DefaultCompilerFilter: "", Loading
java/dexpreopt_config.go +16 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package java import ( "fmt" "path/filepath" "strings" Loading Loading @@ -65,6 +66,16 @@ func setDexpreoptTestGlobalConfig(config android.Config, globalConfig dexpreopt. var dexpreoptGlobalConfigKey = android.NewOnceKey("DexpreoptGlobalConfig") var dexpreoptTestGlobalConfigKey = android.NewOnceKey("TestDexpreoptGlobalConfig") // Expected format for apexJarValue = <apex name>:<jar name> func splitApexJarPair(apexJarValue string) (string, string) { var apexJarPair []string = strings.SplitN(apexJarValue, ":", 2) if apexJarPair == nil || len(apexJarPair) != 2 { panic(fmt.Errorf("malformed apexJarValue: %q, expected format: <apex>:<jar>", apexJarValue)) } return apexJarPair[0], apexJarPair[1] } // 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(). Loading @@ -77,6 +88,11 @@ func systemServerClasspath(ctx android.PathContext) []string { systemServerClasspathLocations = append(systemServerClasspathLocations, filepath.Join("/system/framework", m+".jar")) } for _, m := range global.UpdatableSystemServerJars { apex, jar := splitApexJarPair(m) systemServerClasspathLocations = append(systemServerClasspathLocations, filepath.Join("/apex", apex, "javalib", jar + ".jar")) } return systemServerClasspathLocations }) } Loading