Support proto modules with external references.
Bug: 236055697 Test: Manual testing and adding new unit tests. Change-Id: I984c0ecb93f0023727a39a3af3921820337bf8c7
This commit is contained in:
@@ -178,7 +178,7 @@ func bp2buildProto(ctx android.Bp2buildMutatorContext, m *Module, protoSrcs baze
|
||||
var ret bp2buildProtoDeps
|
||||
|
||||
protoInfo, ok := android.Bp2buildProtoProperties(ctx, &m.ModuleBase, protoSrcs)
|
||||
if !ok {
|
||||
if !ok || protoInfo.Proto_libs.IsEmpty() {
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -201,9 +201,8 @@ func bp2buildProto(ctx android.Bp2buildMutatorContext, m *Module, protoSrcs baze
|
||||
dep := android.BazelLabelForModuleDepSingle(ctx, depName)
|
||||
ret.protoDep = &bazel.LabelAttribute{Value: &dep}
|
||||
|
||||
protoLabel := bazel.Label{Label: ":" + protoInfo.Name}
|
||||
var protoAttrs protoAttributes
|
||||
protoAttrs.Deps.SetValue(bazel.LabelList{Includes: []bazel.Label{protoLabel}})
|
||||
protoAttrs.Deps.SetValue(protoInfo.Proto_libs)
|
||||
|
||||
name := m.Name() + suffix
|
||||
|
||||
|
Reference in New Issue
Block a user