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
This commit is contained in:
parent
78e4695b3a
commit
d3243d5e74
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func genProto(ctx android.ModuleContext, protoFile android.Path, flags android.ProtoFlags) android.Path {
|
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")
|
outDir := srcsZipFile.ReplaceExtension(ctx, "tmp")
|
||||||
depFile := srcsZipFile.ReplaceExtension(ctx, "srcszip.d")
|
depFile := srcsZipFile.ReplaceExtension(ctx, "srcszip.d")
|
||||||
|
|
Loading…
Reference in a new issue