Convert getFdoProfilePathFromDep and addStubDependencyProviders to use
ModuleProxy.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: If06de5f852e6e4574ce0e383ba0bc4fc3508b4b4
diff --git a/cc/cc.go b/cc/cc.go
index 18bffb5..dff8348 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -93,6 +93,11 @@
 type LibraryDecoratorInfo struct {
 	ExportIncludeDirs proptools.Configurable[[]string]
 }
+
+type LibraryInfo struct {
+	StubsVersion string
+}
+
 type TestBinaryInfo struct {
 	Gtest bool
 }
@@ -106,6 +111,7 @@
 	CmakeSnapshotSupported bool
 	CompilerInfo           *CompilerInfo
 	LinkerInfo             *LinkerInfo
+	LibraryInfo            *LibraryInfo
 }
 
 var CcInfoProvider = blueprint.NewProvider[CcInfo]()
@@ -2227,6 +2233,11 @@
 			ccInfo.LinkerInfo.ObjectLinkerInfo = &ObjectLinkerInfo{}
 		}
 	}
+	if c.library != nil {
+		ccInfo.LibraryInfo = &LibraryInfo{
+			StubsVersion: c.library.stubsVersion(),
+		}
+	}
 	android.SetProvider(ctx, CcInfoProvider, ccInfo)
 
 	c.setOutputFiles(ctx)