Require that NDK symbol files end with .map.txt.

We're making an NDK API Council +1 a requirment for changes to these
files, so we need to know that all symbol files will match a given
file pattern.

Test: Changed a symbol file to foo.txt, `make ndk` failed
Test: make ndk
Bug: http://b/35870541
Change-Id: I29690fb97746ad682e57845fea3f1114cfd77598
This commit is contained in:
Dan Albert
2017-06-13 15:14:56 -07:00
parent aac67d38b2
commit 15be0c6a36

View File

@@ -281,6 +281,10 @@ func compileStubLibrary(ctx ModuleContext, flags Flags, symbolFile, apiLevel, vn
}
func (c *stubDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
if !strings.HasSuffix(c.properties.Symbol_file, ".map.txt") {
ctx.PropertyErrorf("symbol_file", "must end with .map.txt")
}
objs, versionScript := compileStubLibrary(ctx, flags, c.properties.Symbol_file, c.properties.ApiLevel, "")
c.versionScriptPath = versionScript
return objs