Add proto.local_include_dirs support in bp2build
This is a followup to aosp/2711093 which added support for proto.include_dirs. local_include_dirs is simlar, except that is relative to the module directory. Test: go test ./bp2build Bug: 285140726 Change-Id: I32ddc7371048672d6935f827c8aee9d767305e2c
This commit is contained in:
@@ -268,6 +268,13 @@ func Bp2buildProtoProperties(ctx Bp2buildMutatorContext, m *ModuleBase, srcs baz
|
||||
protoIncludeDirs = append(protoIncludeDirs, dir)
|
||||
}
|
||||
}
|
||||
|
||||
// proto.local_include_dirs are similar to proto.include_dirs, except that it is relative to the module directory
|
||||
for _, dir := range props.Proto.Local_include_dirs {
|
||||
relativeToTop := pathForModuleSrc(ctx, dir).String()
|
||||
protoIncludeDirs = append(protoIncludeDirs, relativeToTop)
|
||||
}
|
||||
|
||||
} else if props.Proto.Type != info.Type && props.Proto.Type != nil {
|
||||
ctx.ModuleErrorf("Cannot handle arch-variant types for protos at this time.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user