Lines Matching refs:m
289 func processLlndkLibrary(mctx android.BottomUpMutatorContext, m *Module) {
290 lib := m.linker.(*llndkStubDecorator)
291 name := m.BaseModuleName()
292 filename := m.BaseModuleName() + ".so"
302 mctx.AddFarVariationDependencies(m.Target().Variations(), llndkImplDep, name)
306 func processVndkLibrary(mctx android.BottomUpMutatorContext, m *Module) {
307 name := m.BaseModuleName()
308 filename, err := getVndkFileName(m)
313 if m.HasStubsVariants() && name != "libz" {
327 m.Properties.MustUseVendorVariant = true
329 if mctx.DeviceConfig().VndkUseCoreVariant() && !m.Properties.MustUseVendorVariant {
333 if m.vndkdep.isVndkSp() {
338 if !Bool(m.VendorProperties.Vendor_available) {
344 func shouldSkipVndkMutator(m *Module) bool {
345 if !m.Enabled() {
348 if !m.Device() {
352 if m.Target().NativeBridge == android.NativeBridgeEnabled {
359 func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {
360 if shouldSkipVndkMutator(m) {
367 …if p, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok && !p.matchesWithDevice(mctx.DeviceConfig…
371 if lib, ok := m.linker.(libraryInterface); ok {
378 return m.ImageVariation().Variation == android.CoreVariation && lib.shared() && m.isVndkSp()
381 useCoreVariant := m.VndkVersion() == mctx.DeviceConfig().PlatformVndkVersion() &&
382 mctx.DeviceConfig().VndkUseCoreVariant() && !m.MustUseVendorVariant()
383 return lib.shared() && m.inVendor() && m.IsVndk() && !m.isVndkExt() && !useCoreVariant
390 m, ok := mctx.Module().(*Module)
395 if shouldSkipVndkMutator(m) {
399 if _, ok := m.linker.(*llndkStubDecorator); ok {
400 processLlndkLibrary(mctx, m)
404 lib, is_lib := m.linker.(*libraryDecorator)
405 prebuilt_lib, is_prebuilt_lib := m.linker.(*prebuiltLibraryLinker)
408 if m.vndkdep != nil && m.vndkdep.isVndk() && !m.vndkdep.isVndkExt() {
409 processVndkLibrary(mctx, m)
438 m := &vndkLibrariesTxt{}
439 android.InitAndroidModule(m)
440 return m
527 func isVndkSnapshotLibrary(config android.DeviceConfig, m *Module) (i snapshotLibraryInterface, vnd…
528 if m.Target().NativeBridge == android.NativeBridgeEnabled {
531 if !m.inVendor() || !m.installable() || m.isSnapshotPrebuilt() {
534 l, ok := m.linker.(snapshotLibraryInterface)
538 if m.VndkVersion() == config.PlatformVndkVersion() && m.IsVndk() && !m.isVndkExt() {
539 if m.isVndkSp() {
611 …installVndkSnapshotLib := func(m *Module, l snapshotLibraryInterface, vndkType string) (android.Pa…
614 targetArch := "arch-" + m.Target().Arch.ArchType.String()
615 if m.Target().Arch.ArchVariant != "" {
616 targetArch += "-" + m.Target().Arch.ArchVariant
619 libPath := m.outputFile.Path()
633 prop.RelativeInstallPath = m.RelativeInstallPath()
648 m, ok := module.(*Module)
649 if !ok || !m.Enabled() {
653 l, vndkType, ok := isVndkSnapshotLibrary(ctx.DeviceConfig(), m)
660 libs, ok := installVndkSnapshotLib(m, l, vndkType)
667 stem := m.outputFile.Path().Base()
668 moduleNames[stem] = ctx.ModuleName(m)
669 modulePaths[stem] = ctx.ModuleDir(m)
671 if len(m.NoticeFiles()) > 0 {
677 ctx, m.NoticeFiles(), filepath.Join(noticeDir, noticeName)))
694 m, ok := module.(*vndkLibrariesTxt)
695 if !ok || !m.Enabled() || m.Name() == vndkUsingCoreVariantLibrariesTxt {
699 ctx, m.OutputFile(), filepath.Join(configsDir, m.Name())))
709 installMapListFile := func(m map[string]string, path string) android.OutputPath {
711 for idx, k := range android.SortedStringKeys(m) {
717 txtBuilder.WriteString(m[k])
771 func getVndkFileName(m *Module) (string, error) {
772 if library, ok := m.linker.(*libraryDecorator); ok {
773 return library.getLibNameHelper(m.BaseModuleName(), true) + ".so", nil
775 if prebuilt, ok := m.linker.(*prebuiltLibraryLinker); ok {
776 return prebuilt.libraryDecorator.getLibNameHelper(m.BaseModuleName(), true) + ".so", nil
778 …rrorf("VNDK library should have libraryDecorator or prebuiltLibraryLinker as linker: %T", m.linker)