Merge "Ensure that stubs.symbol_file has ".map.txt" suffix" am: 509ab03f12

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574808

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic8a69aef4b1fc5a2518460224707e724519c1ec0
This commit is contained in:
Treehugger Robot
2021-02-10 01:21:41 +00:00
committed by Automerger Merge Worker

View File

@@ -648,6 +648,11 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
return objs
}
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")
library.versionScriptPath = android.OptionalPathForPath(versionScript)
return objs