Merge "Ensure -I . is the first protoc argument" am: 32bf18b10a am: 2d1b27c08b

am: b61e4e6e47

Change-Id: Ieba70f66731f7fc5e616e97bda81b783dd172ce0
This commit is contained in:
Colin Cross 2017-12-20 00:49:38 +00:00 committed by android-build-merger
commit 7b49f1356e
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,9 @@ package android
// generate the source.
func ProtoFlags(ctx ModuleContext, p *ProtoProperties) []string {
var protoFlags []string
// -I . must come first, it affects where protoc places the output files.
protoFlags := []string{"-I ."}
if len(p.Proto.Local_include_dirs) > 0 {
localProtoIncludeDirs := PathsForModuleSrc(ctx, p.Proto.Local_include_dirs)
protoFlags = append(protoFlags, JoinWithPrefix(localProtoIncludeDirs.Strings(), "-I"))
@ -33,8 +35,6 @@ func ProtoFlags(ctx ModuleContext, p *ProtoProperties) []string {
protoFlags = append(protoFlags, JoinWithPrefix(rootProtoIncludeDirs.Strings(), "-I"))
}
protoFlags = append(protoFlags, "-I .")
return protoFlags
}