diff options
Diffstat (limited to 'cc/library_sdk_member.go')
-rw-r--r-- | cc/library_sdk_member.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go index 1f71c1922..e8a98274c 100644 --- a/cc/library_sdk_member.go +++ b/cc/library_sdk_member.go @@ -406,6 +406,9 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b if len(libInfo.StubsVersions) > 0 { stubsSet := outputProperties.AddPropertySet("stubs") stubsSet.AddProperty("versions", libInfo.StubsVersions) + // The symbol file will be copied next to the Android.bp file + stubsSet.AddProperty("symbol_file", libInfo.StubsSymbolFilePath.Base()) + builder.CopyToSnapshot(libInfo.StubsSymbolFilePath, libInfo.StubsSymbolFilePath.Base()) } } @@ -481,6 +484,9 @@ type nativeLibInfoProperties struct { // is written to does not vary by arch so cannot be android specific. StubsVersions []string `sdk:"ignored-on-host"` + // The symbol file containing the APIs exported by this library. + StubsSymbolFilePath android.Path `sdk:"ignored-on-host"` + // Value of SanitizeProperties.Sanitize. Several - but not all - of these // affect the expanded variants. All are propagated to avoid entangling the // sanitizer logic with the snapshot generation. @@ -549,6 +555,11 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte // the versioned stub libs are retained in the prebuilt tree; currently only // the stub corresponding to ccModule.StubsVersion() is. p.StubsVersions = lib.allStubsVersions() + if lib.buildStubs() && ccModule.stubsSymbolFilePath() == nil { + ctx.ModuleErrorf("Could not determine symbol_file") + } else { + p.StubsSymbolFilePath = ccModule.stubsSymbolFilePath() + } } } p.SystemSharedLibs = specifiedDeps.systemSharedLibs |