Lines Matching refs:p
79 func (p *vndkPrebuiltLibraryDecorator) Name(name string) string {
80 return name + p.NameSuffix()
83 func (p *vndkPrebuiltLibraryDecorator) NameSuffix() string {
84 suffix := p.version()
85 if p.arch() != "" {
86 suffix += "." + p.arch()
88 if Bool(p.properties.Binder32bit) {
94 func (p *vndkPrebuiltLibraryDecorator) version() string {
95 return String(p.properties.Version)
98 func (p *vndkPrebuiltLibraryDecorator) arch() string {
99 return String(p.properties.Target_arch)
102 func (p *vndkPrebuiltLibraryDecorator) binderBit() string {
103 if Bool(p.properties.Binder32bit) {
109 func (p *vndkPrebuiltLibraryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
110 p.libraryDecorator.libName = strings.TrimSuffix(ctx.ModuleName(), p.NameSuffix())
111 return p.libraryDecorator.linkerFlags(ctx, flags)
114 func (p *vndkPrebuiltLibraryDecorator) singleSourcePath(ctx ModuleContext) android.Path {
115 if len(p.properties.Srcs) == 0 {
120 if len(p.properties.Srcs) > 1 {
125 return android.PathForModuleSrc(ctx, p.properties.Srcs[0])
128 func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
131 if !p.matchesWithDevice(ctx.DeviceConfig()) {
136 if len(p.properties.Srcs) > 0 && p.shared() {
137 p.libraryDecorator.exportIncludes(ctx)
138 p.libraryDecorator.reexportFlags(p.properties.Export_flags...)
141 in := p.singleSourcePath(ctx)
143 p.unstrippedOutputFile = in
145 if p.needsStrip(ctx) {
147 p.stripExecutableOrSharedLib(ctx, in, stripped, builderFlags)
154 p.tocFile = android.OptionalPathForPath(tocFile)
157 p.androidMkSuffix = p.NameSuffix()
160 if vndkVersion == p.version() {
161 p.androidMkSuffix = ""
171 func (p *vndkPrebuiltLibraryDecorator) matchesWithDevice(config android.DeviceConfig) bool {
173 if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
176 if config.BinderBitness() != p.binderBit() {
179 if len(p.properties.Srcs) == 0 {
185 func (p *vndkPrebuiltLibraryDecorator) nativeCoverage() bool {
189 func (p *vndkPrebuiltLibraryDecorator) isSnapshotPrebuilt() bool {
193 func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.Path) {
195 if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
198 if ctx.DeviceConfig().BinderBitness() != p.binderBit() {
201 if p.shared() {
203 p.baseInstaller.subDir = "vndk-sp-" + p.version()
205 p.baseInstaller.subDir = "vndk-" + p.version()
207 p.baseInstaller.install(ctx, file)