Convert ndkSingleton, apexDepsInfoSingleton, allTeamsSingleton,
apexPrebuiltInfo to use ModuleProxy.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I77b05e8b54843bfa8b91376a6796c2b5c69be3c1
diff --git a/cc/cc.go b/cc/cc.go
index 238827e..f9ff065 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -93,6 +93,9 @@
type LibraryDecoratorInfo struct {
ExportIncludeDirs []string
InjectBsslHash bool
+ // Location of the static library in the sysroot. Empty if the library is
+ // not included in the NDK.
+ NdkSysrootPath android.Path
}
type SnapshotInfo struct {
@@ -108,9 +111,14 @@
AbiDumpPath android.OutputPath
HasAbiDump bool
AbiDiffPaths android.Paths
+ InstallPath android.Path
}
-type ObjectLinkerInfo struct{}
+type ObjectLinkerInfo struct {
+ // Location of the object in the sysroot. Empty if the object is not
+ // included in the NDK.
+ NdkSysrootPath android.Path
+}
type LibraryInfo struct {
BuildStubs bool
@@ -2343,6 +2351,7 @@
case *libraryDecorator:
ccInfo.LinkerInfo.LibraryDecoratorInfo = &LibraryDecoratorInfo{
InjectBsslHash: Bool(c.linker.(*libraryDecorator).Properties.Inject_bssl_hash),
+ NdkSysrootPath: c.linker.(*libraryDecorator).ndkSysrootPath,
}
case *testBinary:
ccInfo.LinkerInfo.TestBinaryInfo = &TestBinaryInfo{
@@ -2351,7 +2360,9 @@
case *benchmarkDecorator:
ccInfo.LinkerInfo.BenchmarkDecoratorInfo = &BenchmarkDecoratorInfo{}
case *objectLinker:
- ccInfo.LinkerInfo.ObjectLinkerInfo = &ObjectLinkerInfo{}
+ ccInfo.LinkerInfo.ObjectLinkerInfo = &ObjectLinkerInfo{
+ NdkSysrootPath: c.linker.(*objectLinker).ndkSysrootPath,
+ }
case *stubDecorator:
ccInfo.LinkerInfo.StubDecoratorInfo = &StubDecoratorInfo{}
}
@@ -2378,6 +2389,7 @@
HasAbiDump: installer.hasAbiDump,
AbiDumpPath: installer.abiDumpPath,
AbiDiffPaths: installer.abiDiffPaths,
+ InstallPath: installer.installPath,
}
}
}