Lines Matching refs:library
110 func (library *libraryDecorator) nativeCoverage() bool {
114 func (library *libraryDecorator) rlib() bool {
115 return library.MutatedProperties.VariantIsRlib
118 func (library *libraryDecorator) dylib() bool {
119 return library.MutatedProperties.VariantIsDylib
122 func (library *libraryDecorator) shared() bool {
123 return library.MutatedProperties.VariantIsShared
126 func (library *libraryDecorator) static() bool {
127 return library.MutatedProperties.VariantIsStatic
130 func (library *libraryDecorator) buildRlib() bool {
131 return library.MutatedProperties.BuildRlib && BoolDefault(library.Properties.Rlib.Enabled, true)
134 func (library *libraryDecorator) buildDylib() bool {
135 return library.MutatedProperties.BuildDylib && BoolDefault(library.Properties.Dylib.Enabled, true)
138 func (library *libraryDecorator) buildShared() bool {
139 …return library.MutatedProperties.BuildShared && BoolDefault(library.Properties.Shared.Enabled, tru…
142 func (library *libraryDecorator) buildStatic() bool {
143 …return library.MutatedProperties.BuildStatic && BoolDefault(library.Properties.Static.Enabled, tru…
146 func (library *libraryDecorator) setRlib() {
147 library.MutatedProperties.VariantIsRlib = true
148 library.MutatedProperties.VariantIsDylib = false
149 library.MutatedProperties.VariantIsStatic = false
150 library.MutatedProperties.VariantIsShared = false
153 func (library *libraryDecorator) setDylib() {
154 library.MutatedProperties.VariantIsRlib = false
155 library.MutatedProperties.VariantIsDylib = true
156 library.MutatedProperties.VariantIsStatic = false
157 library.MutatedProperties.VariantIsShared = false
160 func (library *libraryDecorator) setShared() {
161 library.MutatedProperties.VariantIsStatic = false
162 library.MutatedProperties.VariantIsShared = true
163 library.MutatedProperties.VariantIsRlib = false
164 library.MutatedProperties.VariantIsDylib = false
167 func (library *libraryDecorator) setStatic() {
168 library.MutatedProperties.VariantIsStatic = true
169 library.MutatedProperties.VariantIsShared = false
170 library.MutatedProperties.VariantIsRlib = false
171 library.MutatedProperties.VariantIsDylib = false
174 func (library *libraryDecorator) autoDep() autoDep {
175 if library.rlib() || library.static() {
177 } else if library.dylib() || library.shared() {
190 module, library := NewRustLibrary(android.HostAndDeviceSupported)
191 library.BuildOnlyRust()
197 module, library := NewRustLibrary(android.HostAndDeviceSupported)
198 library.BuildOnlyFFI()
204 module, library := NewRustLibrary(android.HostAndDeviceSupported)
205 library.BuildOnlyDylib()
211 module, library := NewRustLibrary(android.HostAndDeviceSupported)
212 library.BuildOnlyRlib()
218 module, library := NewRustLibrary(android.HostAndDeviceSupported)
219 library.BuildOnlyShared()
225 module, library := NewRustLibrary(android.HostAndDeviceSupported)
226 library.BuildOnlyStatic()
232 module, library := NewRustLibrary(android.HostSupported)
233 library.BuildOnlyRust()
239 module, library := NewRustLibrary(android.HostSupported)
240 library.BuildOnlyFFI()
246 module, library := NewRustLibrary(android.HostSupported)
247 library.BuildOnlyDylib()
253 module, library := NewRustLibrary(android.HostSupported)
254 library.BuildOnlyRlib()
260 module, library := NewRustLibrary(android.HostSupported)
261 library.BuildOnlyStatic()
267 module, library := NewRustLibrary(android.HostSupported)
268 library.BuildOnlyShared()
272 func (library *libraryDecorator) BuildOnlyFFI() {
273 library.MutatedProperties.BuildDylib = false
274 library.MutatedProperties.BuildRlib = false
275 library.MutatedProperties.BuildShared = true
276 library.MutatedProperties.BuildStatic = true
279 func (library *libraryDecorator) BuildOnlyRust() {
280 library.MutatedProperties.BuildDylib = true
281 library.MutatedProperties.BuildRlib = true
282 library.MutatedProperties.BuildShared = false
283 library.MutatedProperties.BuildStatic = false
286 func (library *libraryDecorator) BuildOnlyDylib() {
287 library.MutatedProperties.BuildDylib = true
288 library.MutatedProperties.BuildRlib = false
289 library.MutatedProperties.BuildShared = false
290 library.MutatedProperties.BuildStatic = false
293 func (library *libraryDecorator) BuildOnlyRlib() {
294 library.MutatedProperties.BuildDylib = false
295 library.MutatedProperties.BuildRlib = true
296 library.MutatedProperties.BuildShared = false
297 library.MutatedProperties.BuildStatic = false
300 func (library *libraryDecorator) BuildOnlyStatic() {
301 library.MutatedProperties.BuildRlib = false
302 library.MutatedProperties.BuildDylib = false
303 library.MutatedProperties.BuildShared = false
304 library.MutatedProperties.BuildStatic = true
307 func (library *libraryDecorator) BuildOnlyShared() {
308 library.MutatedProperties.BuildRlib = false
309 library.MutatedProperties.BuildDylib = false
310 library.MutatedProperties.BuildStatic = false
311 library.MutatedProperties.BuildShared = true
317 library := &libraryDecorator{
328 module.compiler = library
330 return module, library
333 func (library *libraryDecorator) compilerProps() []interface{} {
334 return append(library.baseCompiler.compilerProps(),
335 &library.Properties,
336 &library.MutatedProperties)
339 func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
340 deps = library.baseCompiler.compilerDeps(ctx, deps)
342 if ctx.toolchain().Bionic() && (library.dylib() || library.shared()) {
351 func (library *libraryDecorator) sharedLibFilename(ctx ModuleContext) string {
352 return library.getStem(ctx) + ctx.toolchain().SharedLibSuffix()
355 func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
357 flags = library.baseCompiler.compilerFlags(ctx, flags)
358 if library.shared() || library.static() {
359 …library.includeDirs = append(library.includeDirs, android.PathsForModuleSrc(ctx, library.Propertie…
361 if library.shared() {
362 flags.LinkFlags = append(flags.LinkFlags, "-Wl,-soname="+library.sharedLibFilename(ctx))
368 func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Pat…
371 srcPath, _ := srcPathFromModuleSrcs(ctx, library.baseCompiler.Properties.Srcs)
375 if library.dylib() {
382 if library.rlib() {
383 fileName := library.getStem(ctx) + ctx.toolchain().RlibSuffix()
387 library.coverageFile = outputs.coverageFile
388 } else if library.dylib() {
389 fileName := library.getStem(ctx) + ctx.toolchain().DylibSuffix()
393 library.coverageFile = outputs.coverageFile
394 } else if library.static() {
395 fileName := library.getStem(ctx) + ctx.toolchain().StaticLibSuffix()
399 library.coverageFile = outputs.coverageFile
400 } else if library.shared() {
401 fileName := library.sharedLibFilename(ctx)
405 library.coverageFile = outputs.coverageFile
409 if library.coverageFile != nil {
410 coverageFiles = append(coverageFiles, library.coverageFile)
415 …library.coverageOutputZipFile = TransformCoverageFilesToZip(ctx, coverageFiles, library.getStem(ct…
417 if library.rlib() || library.dylib() {
418 library.exportLinkDirs(deps.linkDirs...)
419 library.exportDepFlags(deps.depFlags...)
421 library.unstrippedOutputFile = outputFile
426 func (library *libraryDecorator) getStem(ctx ModuleContext) string {
427 stem := library.baseCompiler.getStemWithoutSuffix(ctx)
428 validateLibraryStem(ctx, stem, library.crateName())
430 return stem + String(library.baseCompiler.Properties.Suffix)
455 switch library := m.compiler.(type) {
457 if library.buildRlib() && library.buildDylib() {
464 } else if library.buildRlib() {
467 } else if library.buildDylib() {