diff --git a/ui/build/soong.go b/ui/build/soong.go index a4cf7fbf0..44ce3ad08 100644 --- a/ui/build/soong.go +++ b/ui/build/soong.go @@ -195,9 +195,13 @@ func (pb PrimaryBuilderFactory) primaryBuilderInvocation() bootstrap.PrimaryBuil var allArgs []string allArgs = append(allArgs, pb.specificArgs...) + globPathName, ok := pb.config.TargetProductOrErr() + if ok != nil { + globPathName = pb.name + } allArgs = append(allArgs, - "--globListDir", pb.name, - "--globFile", pb.config.NamedGlobFile(pb.name)) + "--globListDir", globPathName, + "--globFile", pb.config.NamedGlobFile(globPathName)) allArgs = append(allArgs, commonArgs...) allArgs = append(allArgs, environmentArgs(pb.config, pb.name)...)