func bpModuleNamesForDep(mctx blueprint.BaseModuleContext, name string) []string {
	var dep blueprint.Module
	mctx.VisitDirectDeps(func(m blueprint.Module) {
		if m.Name() == name {
			dep = m
		}
	})
	if dep == nil {
		panic(fmt.Errorf("%s has no dependency '%s'", mctx.ModuleName(), name))
	}
	if r, ok := dep.(*resource); ok {
		var modNames []string
		for _, src := range r.Properties.getSources(mctx) {
			modNames = append(modNames, r.getAndroidbpResourceName(src))
		}
		if len(modNames) == 0 {
			panic(fmt.Errorf("bob_resource %s has empty srcs", name))
		}
		return modNames
	}
	if l, ok := getLibrary(dep); ok {
		return []string{l.shortName()}
	}
	return []string{dep.Name()}
}
Convert between Bob module names, and the name we will give the generated
cc_library module. This is required when a module supports being built on
host and target; we cannot create two modules with the same name, so
instead, we use the `shortName()` (which may include a `__host` or
`__target` suffix) to disambiguate, and use the `stem` property to fix up
the output filename.
Note that this function returns a list of names instead of a single name.
This is due to resource module that can generate multiple Blueprint modules.
All other bob modules only return one name.
package core
import (
	"fmt"
	"github.com/google/blueprint"
	"github.com/google/blueprint/proptools"
	"github.com/ARM-software/bob-build/internal/bpwriter"
	"github.com/ARM-software/bob-build/internal/ccflags"
	"github.com/ARM-software/bob-build/internal/utils"
)