Use VisitDirectDepsProxy in checkStaticExecutables.
Bug: 377723687
Test: Check the ninja and mk files.
Change-Id: I1c12fcabc7b389a85ffede0f9a03fdaeb92f1f5d
diff --git a/cc/cc.go b/cc/cc.go
index 08a93cb9..7db0b9e 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -53,6 +53,13 @@
var CcObjectInfoProvider = blueprint.NewProvider[CcObjectInfo]()
+type LinkableInfo struct {
+ // StaticExecutable returns true if this is a binary module with "static_executable: true".
+ StaticExecutable bool
+}
+
+var LinkableInfoKey = blueprint.NewProvider[LinkableInfo]()
+
func init() {
RegisterCCBuildComponents(android.InitRegistrationContext)
@@ -2119,6 +2126,10 @@
android.SetProvider(ctx, CcObjectInfoProvider, ccObjectInfo)
}
+ android.SetProvider(ctx, LinkableInfoKey, LinkableInfo{
+ StaticExecutable: c.StaticExecutable(),
+ })
+
c.setOutputFiles(ctx)
if c.makeVarsInfo != nil {