diff options
author | 2022-09-01 11:54:47 -0700 | |
---|---|---|
committer | 2022-09-14 13:02:53 -0700 | |
commit | 2aa806b52d305b1fd0eb7007f13a331eaa034e17 (patch) | |
tree | 59035754afe801982c7a572b14656138459da08b /cc/proto.go | |
parent | 8c6f4576ef15c9266c06d83bf032d976fff88648 (diff) |
Support proto modules with external references.
Bug: 236055697
Test: Manual testing and adding new unit tests.
Change-Id: I984c0ecb93f0023727a39a3af3921820337bf8c7
Diffstat (limited to 'cc/proto.go')
-rw-r--r-- | cc/proto.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cc/proto.go b/cc/proto.go index 8e6d5ed5f..cf5ed04f2 100644 --- a/cc/proto.go +++ b/cc/proto.go @@ -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 |