Convert checkStaticLinkingToStubLibraries to use module proxy.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: Id776727a431f2ce8fd4c7b352dc0bd282ac57f90
diff --git a/cc/cc.go b/cc/cc.go
index 03f738f..4838a5f 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -53,6 +53,13 @@
var CcObjectInfoProvider = blueprint.NewProvider[CcObjectInfo]()
+// Common info about the cc module.
+type CcInfo struct {
+ HasStubsVariants bool
+}
+
+var CcInfoProvider = blueprint.NewProvider[CcInfo]()
+
type LinkableInfo struct {
// StaticExecutable returns true if this is a binary module with "static_executable: true".
StaticExecutable bool
@@ -2124,6 +2131,10 @@
StaticExecutable: c.StaticExecutable(),
})
+ android.SetProvider(ctx, CcInfoProvider, CcInfo{
+ HasStubsVariants: c.HasStubsVariants(),
+ })
+
c.setOutputFiles(ctx)
if c.makeVarsInfo != nil {