Loading android/config.go +4 −0 Original line number Diff line number Diff line Loading @@ -1103,6 +1103,10 @@ func (c *config) ProductCompatibleProperty() bool { return Bool(c.productVariables.ProductCompatibleProperty) } func (c *config) MissingUsesLibraries() []string { return c.productVariables.MissingUsesLibraries } func (c *deviceConfig) BoardVndkRuntimeDisable() bool { return Bool(c.config.productVariables.BoardVndkRuntimeDisable) } Loading android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -306,6 +306,8 @@ type productVariables struct { ProductCompatibleProperty *bool `json:",omitempty"` TargetFSConfigGen []string `json:",omitempty"` MissingUsesLibraries []string `json:",omitempty"` } func boolPtr(v bool) *bool { Loading dexpreopt/config.go +4 −7 Original line number Diff line number Diff line Loading @@ -65,8 +65,6 @@ type GlobalConfig struct { AlwaysOtherDebugInfo bool // always generate mini debug info for non-system server modules (overrides NoDebugInfo=true) NeverOtherDebugInfo bool // never generate mini debug info for non-system server modules (overrides NoDebugInfo=true) MissingUsesLibraries []string // libraries that may be listed in OptionalUsesLibraries but will not be installed by the product IsEng bool // build is a eng variant SanitizeLite bool // build is the second phase of a SANITIZE_LITE build Loading Loading @@ -119,7 +117,7 @@ type ModuleConfig struct { ProfileIsTextListing bool EnforceUsesLibraries bool OptionalUsesLibraries []string PresentOptionalUsesLibraries []string UsesLibraries []string LibraryPaths map[string]android.Path Loading Loading @@ -310,7 +308,6 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { NeverSystemServerDebugInfo: false, AlwaysOtherDebugInfo: false, NeverOtherDebugInfo: false, MissingUsesLibraries: nil, IsEng: false, SanitizeLite: false, DefaultAppImages: false, Loading dexpreopt/dexpreopt.go +5 −9 Original line number Diff line number Diff line Loading @@ -226,11 +226,6 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul bootImageLocation = PathToLocation(bootImage, arch) } // Lists of used and optional libraries from the build config, with optional libraries that are known to not // be present in the current product removed. var filteredUsesLibs []string var filteredOptionalUsesLibs []string // The class loader context using paths in the build var classLoaderContextHost android.Paths Loading @@ -248,11 +243,10 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul var classLoaderContextHostString string if module.EnforceUsesLibraries { filteredOptionalUsesLibs = filterOut(global.MissingUsesLibraries, module.OptionalUsesLibraries) filteredUsesLibs = append(copyOf(module.UsesLibraries), filteredOptionalUsesLibs...) usesLibs := append(copyOf(module.UsesLibraries), module.PresentOptionalUsesLibraries...) // Create class loader context for dex2oat from uses libraries and filtered optional libraries for _, l := range filteredUsesLibs { for _, l := range usesLibs { classLoaderContextHost = append(classLoaderContextHost, pathForLibrary(module, l)) Loading @@ -267,7 +261,9 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul // targetSdkVersion in the manifest or APK is < 28, and the module does not explicitly depend on // org.apache.http.legacy, then implicitly add the classes to the classpath for dexpreopt. One the // device the classes will be in a file called org.apache.http.legacy.impl.jar. if !contains(module.UsesLibraries, httpLegacy) && !contains(module.OptionalUsesLibraries, httpLegacy) { module.LibraryPaths[httpLegacyImpl] = module.LibraryPaths[httpLegacy] if !contains(module.UsesLibraries, httpLegacy) && !contains(module.PresentOptionalUsesLibraries, httpLegacy) { conditionalClassLoaderContextHost28 = append(conditionalClassLoaderContextHost28, pathForLibrary(module, httpLegacyImpl)) conditionalClassLoaderContextTarget28 = append(conditionalClassLoaderContextTarget28, Loading dexpreopt/dexpreopt_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ func testModuleConfig(ctx android.PathContext) ModuleConfig { ProfileClassListing: android.OptionalPath{}, ProfileIsTextListing: false, EnforceUsesLibraries: false, OptionalUsesLibraries: nil, PresentOptionalUsesLibraries: nil, UsesLibraries: nil, LibraryPaths: nil, Archs: []android.ArchType{android.Arm}, Loading Loading
android/config.go +4 −0 Original line number Diff line number Diff line Loading @@ -1103,6 +1103,10 @@ func (c *config) ProductCompatibleProperty() bool { return Bool(c.productVariables.ProductCompatibleProperty) } func (c *config) MissingUsesLibraries() []string { return c.productVariables.MissingUsesLibraries } func (c *deviceConfig) BoardVndkRuntimeDisable() bool { return Bool(c.config.productVariables.BoardVndkRuntimeDisable) } Loading
android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -306,6 +306,8 @@ type productVariables struct { ProductCompatibleProperty *bool `json:",omitempty"` TargetFSConfigGen []string `json:",omitempty"` MissingUsesLibraries []string `json:",omitempty"` } func boolPtr(v bool) *bool { Loading
dexpreopt/config.go +4 −7 Original line number Diff line number Diff line Loading @@ -65,8 +65,6 @@ type GlobalConfig struct { AlwaysOtherDebugInfo bool // always generate mini debug info for non-system server modules (overrides NoDebugInfo=true) NeverOtherDebugInfo bool // never generate mini debug info for non-system server modules (overrides NoDebugInfo=true) MissingUsesLibraries []string // libraries that may be listed in OptionalUsesLibraries but will not be installed by the product IsEng bool // build is a eng variant SanitizeLite bool // build is the second phase of a SANITIZE_LITE build Loading Loading @@ -119,7 +117,7 @@ type ModuleConfig struct { ProfileIsTextListing bool EnforceUsesLibraries bool OptionalUsesLibraries []string PresentOptionalUsesLibraries []string UsesLibraries []string LibraryPaths map[string]android.Path Loading Loading @@ -310,7 +308,6 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { NeverSystemServerDebugInfo: false, AlwaysOtherDebugInfo: false, NeverOtherDebugInfo: false, MissingUsesLibraries: nil, IsEng: false, SanitizeLite: false, DefaultAppImages: false, Loading
dexpreopt/dexpreopt.go +5 −9 Original line number Diff line number Diff line Loading @@ -226,11 +226,6 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul bootImageLocation = PathToLocation(bootImage, arch) } // Lists of used and optional libraries from the build config, with optional libraries that are known to not // be present in the current product removed. var filteredUsesLibs []string var filteredOptionalUsesLibs []string // The class loader context using paths in the build var classLoaderContextHost android.Paths Loading @@ -248,11 +243,10 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul var classLoaderContextHostString string if module.EnforceUsesLibraries { filteredOptionalUsesLibs = filterOut(global.MissingUsesLibraries, module.OptionalUsesLibraries) filteredUsesLibs = append(copyOf(module.UsesLibraries), filteredOptionalUsesLibs...) usesLibs := append(copyOf(module.UsesLibraries), module.PresentOptionalUsesLibraries...) // Create class loader context for dex2oat from uses libraries and filtered optional libraries for _, l := range filteredUsesLibs { for _, l := range usesLibs { classLoaderContextHost = append(classLoaderContextHost, pathForLibrary(module, l)) Loading @@ -267,7 +261,9 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul // targetSdkVersion in the manifest or APK is < 28, and the module does not explicitly depend on // org.apache.http.legacy, then implicitly add the classes to the classpath for dexpreopt. One the // device the classes will be in a file called org.apache.http.legacy.impl.jar. if !contains(module.UsesLibraries, httpLegacy) && !contains(module.OptionalUsesLibraries, httpLegacy) { module.LibraryPaths[httpLegacyImpl] = module.LibraryPaths[httpLegacy] if !contains(module.UsesLibraries, httpLegacy) && !contains(module.PresentOptionalUsesLibraries, httpLegacy) { conditionalClassLoaderContextHost28 = append(conditionalClassLoaderContextHost28, pathForLibrary(module, httpLegacyImpl)) conditionalClassLoaderContextTarget28 = append(conditionalClassLoaderContextTarget28, Loading
dexpreopt/dexpreopt_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ func testModuleConfig(ctx android.PathContext) ModuleConfig { ProfileClassListing: android.OptionalPath{}, ProfileIsTextListing: false, EnforceUsesLibraries: false, OptionalUsesLibraries: nil, PresentOptionalUsesLibraries: nil, UsesLibraries: nil, LibraryPaths: nil, Archs: []android.ArchType{android.Arm}, Loading