Implement stubs.symbol_file and stubs.versions for cc_library_shared bp2build.

This CL turns the stubs.symbol_file and stubs.versions properties into
stubs_symbol_file and stubs_version attributes on the cc_shared_library
target. See associated build/bazel change on how these attributes are
used to generate stub libraries.

Bug: 207812332

Test: New tests
Test: CI
Change-Id: Ie23eafb9903a131d92ff4e251215e998cea0a763
This commit is contained in:
Jingwen Chen
2022-01-07 14:55:29 +00:00
parent 2a1291d01d
commit 0ee88a6b65
8 changed files with 102 additions and 3 deletions

View File

@@ -381,6 +381,9 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
None: linkerAttrs.stripNone,
},
Features: linkerAttrs.features,
Stubs_symbol_file: compilerAttrs.stubsSymbolFile,
Stubs_versions: compilerAttrs.stubsVersions,
}
staticProps := bazel.BazelTargetModuleProperties{
@@ -2518,6 +2521,9 @@ func sharedOrStaticLibraryBp2Build(ctx android.TopDownMutatorContext, module *Mo
},
Features: linkerAttrs.features,
Stubs_symbol_file: compilerAttrs.stubsSymbolFile,
Stubs_versions: compilerAttrs.stubsVersions,
}
}
@@ -2591,4 +2597,7 @@ type bazelCcLibrarySharedAttributes struct {
Asflags bazel.StringListAttribute
Features bazel.StringListAttribute
Stubs_symbol_file *string
Stubs_versions bazel.StringListAttribute
}