Add C symbol file to module sdk snapshot

cc_prebuilt_library_shared does not currently support generating stubs
from API symbol_files, and therefore the symbol file was removed from
the module sdk snapshots in https://ag.corp.google.com/11394495

As part of b/275273834, the stubs will be generated from the API files
for cc_prebuilt_library_shared, so add the symbol file back to the
module sdk

Bug: 275273834
Test: m nothing --no-skip-soong-tests
Test: m art-module-sdk and verified the map.txt is copied to the zip
next to the Android.bp file

Change-Id: I9551e7b8a76ceb9db3ed0434d315b6839f5e3d54
This commit is contained in:
Spandan Das
2024-07-23 21:34:24 +00:00
parent 9a2f01b762
commit e20c56cdf0
4 changed files with 24 additions and 0 deletions

View File

@@ -428,6 +428,9 @@ type libraryDecorator struct {
*baseInstaller
apiListCoverageXmlPath android.ModuleOutPath
// Path to the file containing the APIs exported by this library
stubsSymbolFilePath android.Path
}
// linkerProps returns the list of properties structs relevant for this library. (For example, if
@@ -596,6 +599,7 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
ctx.PropertyErrorf("symbol_file", "%q doesn't have .map.txt suffix", symbolFile)
return Objects{}
}
library.stubsSymbolFilePath = android.PathForModuleSrc(ctx, symbolFile)
// b/239274367 --apex and --systemapi filters symbols tagged with # apex and #
// systemapi, respectively. The former is for symbols defined in platform libraries
// and the latter is for symbols defined in APEXes.