Loading cc/vndk_prebuilt.go +22 −3 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import ( var ( vndkSuffix = ".vndk." binder32Suffix = ".binder32" ) // Creates vndk prebuilts that include the VNDK version. Loading Loading @@ -53,6 +54,10 @@ type vndkPrebuiltProperties struct { // Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64_ab') Target_arch *string // If the prebuilt snapshot lib is built with 32 bit binder, this must be set to true. // The lib with 64 bit binder does not need to set this property. Binder32bit *bool // Prebuilt files for each arch. Srcs []string `android:"arch_variant"` } Loading @@ -67,10 +72,14 @@ func (p *vndkPrebuiltLibraryDecorator) Name(name string) string { } func (p *vndkPrebuiltLibraryDecorator) NameSuffix() string { suffix := p.version() if p.arch() != "" { return vndkSuffix + p.version() + "." + p.arch() suffix += "." + p.arch() } if Bool(p.properties.Binder32bit) { suffix += binder32Suffix } return vndkSuffix + p.version() return vndkSuffix + suffix } func (p *vndkPrebuiltLibraryDecorator) version() string { Loading @@ -81,6 +90,13 @@ func (p *vndkPrebuiltLibraryDecorator) arch() string { return String(p.properties.Target_arch) } func (p *vndkPrebuiltLibraryDecorator) binderBit() string { if Bool(p.properties.Binder32bit) { return "32" } return "64" } func (p *vndkPrebuiltLibraryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags { p.libraryDecorator.libName = strings.TrimSuffix(ctx.ModuleName(), p.NameSuffix()) return p.libraryDecorator.linkerFlags(ctx, flags) Loading Loading @@ -114,6 +130,9 @@ func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.P if len(arches) == 0 || arches[0].ArchType.String() != p.arch() { return } if ctx.DeviceConfig().BinderBitness() != p.binderBit() { return } if p.shared() { if ctx.isVndkSp() { p.baseInstaller.subDir = "vndk-sp-" + p.version() Loading Loading
cc/vndk_prebuilt.go +22 −3 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import ( var ( vndkSuffix = ".vndk." binder32Suffix = ".binder32" ) // Creates vndk prebuilts that include the VNDK version. Loading Loading @@ -53,6 +54,10 @@ type vndkPrebuiltProperties struct { // Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64_ab') Target_arch *string // If the prebuilt snapshot lib is built with 32 bit binder, this must be set to true. // The lib with 64 bit binder does not need to set this property. Binder32bit *bool // Prebuilt files for each arch. Srcs []string `android:"arch_variant"` } Loading @@ -67,10 +72,14 @@ func (p *vndkPrebuiltLibraryDecorator) Name(name string) string { } func (p *vndkPrebuiltLibraryDecorator) NameSuffix() string { suffix := p.version() if p.arch() != "" { return vndkSuffix + p.version() + "." + p.arch() suffix += "." + p.arch() } if Bool(p.properties.Binder32bit) { suffix += binder32Suffix } return vndkSuffix + p.version() return vndkSuffix + suffix } func (p *vndkPrebuiltLibraryDecorator) version() string { Loading @@ -81,6 +90,13 @@ func (p *vndkPrebuiltLibraryDecorator) arch() string { return String(p.properties.Target_arch) } func (p *vndkPrebuiltLibraryDecorator) binderBit() string { if Bool(p.properties.Binder32bit) { return "32" } return "64" } func (p *vndkPrebuiltLibraryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags { p.libraryDecorator.libName = strings.TrimSuffix(ctx.ModuleName(), p.NameSuffix()) return p.libraryDecorator.linkerFlags(ctx, flags) Loading Loading @@ -114,6 +130,9 @@ func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.P if len(arches) == 0 || arches[0].ArchType.String() != p.arch() { return } if ctx.DeviceConfig().BinderBitness() != p.binderBit() { return } if p.shared() { if ctx.isVndkSp() { p.baseInstaller.subDir = "vndk-sp-" + p.version() Loading