Refactor cc/rust to prep for Rust stubs
This CL largely handles this refactoring in preparation for Rust stubs
support.
Rust modules need to be able to communicate stubs information to cc, and
certain bits of cc needs to be exported so rust can reuse them.
A new VersionedLinkableInterface is added to capture most of the
stubs-related interface definitions.
Bug: 203478530
Test: m blueprint_tests
Change-Id: I380225402fa85a3c39e7b18deb657054b3a52fbe
diff --git a/cc/coverage.go b/cc/coverage.go
index dbb424f..4e058bd 100644
--- a/cc/coverage.go
+++ b/cc/coverage.go
@@ -354,10 +354,10 @@
}
}
-func parseSymbolFileForAPICoverage(ctx ModuleContext, symbolFile string) android.ModuleOutPath {
+func parseSymbolFileForAPICoverage(ctx android.ModuleContext, symbolFile string) android.ModuleOutPath {
apiLevelsJson := android.GetApiLevelsJson(ctx)
symbolFilePath := android.PathForModuleSrc(ctx, symbolFile)
- outputFile := ctx.baseModuleName() + ".xml"
+ outputFile := ctx.Module().(LinkableInterface).BaseModuleName() + ".xml"
parsedApiCoveragePath := android.PathForModuleOut(ctx, outputFile)
rule := android.NewRuleBuilder(pctx, ctx)
rule.Command().