Convert getLibsForLinkerConfig to use ModuleProxy.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: Ib8020db0d1cf9e035ace52e2a893bb3df7975127
diff --git a/cc/cc.go b/cc/cc.go
index f9097e4..af1b259 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -78,7 +78,8 @@
// list of modules that should be dynamically linked into this module.
SharedLibs proptools.Configurable[[]string]
// list of modules that should only provide headers for this module.
- HeaderLibs proptools.Configurable[[]string]
+ HeaderLibs proptools.Configurable[[]string]
+ ImplementationModuleName *string
BinaryDecoratorInfo *BinaryDecoratorInfo
LibraryDecoratorInfo *LibraryDecoratorInfo
@@ -115,6 +116,7 @@
type CcInfo struct {
IsPrebuilt bool
CmakeSnapshotSupported bool
+ HasLlndkStubs bool
CompilerInfo *CompilerInfo
LinkerInfo *LinkerInfo
SnapshotInfo *SnapshotInfo
@@ -2237,6 +2239,7 @@
ccInfo := CcInfo{
IsPrebuilt: c.IsPrebuilt(),
CmakeSnapshotSupported: proptools.Bool(c.Properties.Cmake_snapshot_supported),
+ HasLlndkStubs: c.HasLlndkStubs(),
}
if c.compiler != nil {
ccInfo.CompilerInfo = &CompilerInfo{
@@ -2287,6 +2290,10 @@
SnapshotAndroidMkSuffix: s.SnapshotAndroidMkSuffix(),
}
}
+ if v, ok := c.linker.(versionedInterface); ok {
+ name := v.implementationModuleName(ctx.OtherModuleName(c))
+ ccInfo.LinkerInfo.ImplementationModuleName = &name
+ }
}
if c.library != nil {
ccInfo.LibraryInfo = &LibraryInfo{