diff options
author | 2023-08-15 15:07:22 +0000 | |
---|---|---|
committer | 2023-08-15 18:33:00 +0000 | |
commit | d3243d5e74823cc60da1ff817ef4e932eed6c564 (patch) | |
tree | 6232894b4708a61266cf47fd34ce023c26823d75 /python/proto.go | |
parent | 78e4695b3a1831ac81c02698da4b7b2cd03cb17b (diff) |
Use relative path instead of base for python proto
We encountered a duplicate sources bug in python proto generation
because we're only using the base name. This CL makes it use the
entire path to avoid this.
Fixes: 295333879
Test: Presubmits
Change-Id: I4ab821508cd5979bd595e327c1ccd3d68110fba6
Diffstat (limited to 'python/proto.go')
-rw-r--r-- | python/proto.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/proto.go b/python/proto.go index 400e72c99..ad2b786e2 100644 --- a/python/proto.go +++ b/python/proto.go @@ -19,7 +19,8 @@ import ( ) func genProto(ctx android.ModuleContext, protoFile android.Path, flags android.ProtoFlags) android.Path { - srcsZipFile := android.PathForModuleGen(ctx, protoFile.Base()+".srcszip") + // Using protoFile.Base() would generate duplicate source errors in some cases, so we use Rel() instead + srcsZipFile := android.PathForModuleGen(ctx, protoFile.Rel()+".srcszip") outDir := srcsZipFile.ReplaceExtension(ctx, "tmp") depFile := srcsZipFile.ReplaceExtension(ctx, "srcszip.d") |