Parameterize cc_stub_suite for api surface

cc_stub_suite now has an additional attribute correponding to the api
surface. This attribute will be used to pass additional args to the stub
generator.

Update bp2build to set the api_surface of the apex stubs. This ensures
that its stubs are generated with "--systemapi --apex"

Test: unit tests
Bug: 298085502
Change-Id: If4c479f85e6e485b5c795a565a0c559f1f013bf5
This commit is contained in:
Spandan Das
2023-09-13 23:59:05 +00:00
parent b46969dd3d
commit 04f9f4cf71
5 changed files with 8 additions and 0 deletions

View File

@@ -543,6 +543,7 @@ cc_library_shared {
},
Blueprint: soongCcLibraryPreamble,
ExpectedBazelTargets: []string{makeCcStubSuiteTargets("a", AttrNameToString{
"api_surface": `"module-libapi"`,
"soname": `"a.so"`,
"source_library_label": `"//foo/bar:a"`,
"stubs_symbol_file": `"a.map.txt"`,
@@ -1442,6 +1443,7 @@ cc_library_shared {
`,
ExpectedBazelTargets: []string{
makeCcStubSuiteTargets("a", AttrNameToString{
"api_surface": `"module-libapi"`,
"soname": `"a.so"`,
"source_library_label": `"//:a"`,
"stubs_symbol_file": `"a.map.txt"`,
@@ -1456,6 +1458,7 @@ cc_library_shared {
"stubs_symbol_file": `"a.map.txt"`,
}),
makeCcStubSuiteTargets("b", AttrNameToString{
"api_surface": `"module-libapi"`,
"soname": `"b.so"`,
"source_library_label": `"//:b"`,
"stubs_symbol_file": `"b.map.txt"`,