rust: Emit toc files for cdylibs

Write toc files that list the exported symbols so dependents are
only rebuilt if the exported symbols change.

This exports the CC function TransformSharedObjectToToc, and also
removes an unused arg from its signature.

Bug: 178185435
Test: New Soong test passes.
Test: m <toc file path>
Change-Id: I7ab69bf7e7f32f25eb4c7ca9d18d877dac1511db
This commit is contained in:
Ivan Lozano
2021-11-03 15:30:18 -04:00
parent a3bd963988
commit 7b0781d14c
10 changed files with 53 additions and 18 deletions

View File

@@ -949,8 +949,7 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
}
// Generate a rule for extracting a table of contents from a shared library (.so)
func transformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Path,
outputFile android.WritablePath, flags builderFlags) {
func TransformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Path, outputFile android.WritablePath) {
var format string
if ctx.Darwin() {