def format(target): """Return the module name of a target if built by Soong, '' otherwise.""" p = providers(target) if not p: return "" soong_prebuilt_info = p.get( "//bazel/rules:soong_prebuilt.bzl%SoongPrebuiltInfo") if soong_prebuilt_info: return "%s:%s" % (soong_prebuilt_info.module_name, soong_prebuilt_info.platform_flavor) return ""