summaryrefslogtreecommitdiff
path: root/cc/cc.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-25 00:54:20 +0000
committer Yu Liu <yudiliu@google.com> 2025-02-25 19:05:48 +0000
commit95cef3a35a7dda90447e94b6bd1370043ee2cedb (patch)
tree3bd39af4a269da4cd68ec0328d999986be105748 /cc/cc.go
parent2a815b6d8ea8f29b54f780b1219c28b0c8c977aa (diff)
Convert ndkSingleton, apexDepsInfoSingleton, allTeamsSingleton,
apexPrebuiltInfo to use ModuleProxy. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I77b05e8b54843bfa8b91376a6796c2b5c69be3c1
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 238827eb1..f9ff06518 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -93,6 +93,9 @@ type BinaryDecoratorInfo struct{}
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 @@ type StubDecoratorInfo struct {
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 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
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 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
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 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
HasAbiDump: installer.hasAbiDump,
AbiDumpPath: installer.abiDumpPath,
AbiDiffPaths: installer.abiDiffPaths,
+ InstallPath: installer.installPath,
}
}
}