Merge "Ensure that stubs.symbol_file has ".map.txt" suffix"

This commit is contained in:
Treehugger Robot 2021-02-10 01:07:30 +00:00 committed by Gerrit Code Review
commit 509ab03f12
1 changed files with 5 additions and 0 deletions

View File

@ -648,6 +648,11 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
return objs return objs
} }
if library.buildStubs() { if library.buildStubs() {
symbolFile := String(library.Properties.Stubs.Symbol_file)
if symbolFile != "" && !strings.HasSuffix(symbolFile, ".map.txt") {
ctx.PropertyErrorf("symbol_file", "%q doesn't have .map.txt suffix", symbolFile)
return Objects{}
}
objs, versionScript := compileStubLibrary(ctx, flags, String(library.Properties.Stubs.Symbol_file), library.MutatedProperties.StubsVersion, "--apex") objs, versionScript := compileStubLibrary(ctx, flags, String(library.Properties.Stubs.Symbol_file), library.MutatedProperties.StubsVersion, "--apex")
library.versionScriptPath = android.OptionalPathForPath(versionScript) library.versionScriptPath = android.OptionalPathForPath(versionScript)
return objs return objs