Support genrules as CrtBegin and CrtEnd
Host bionic will use a genrule output as a linker script in CrtBegin,
support genrules as Crt* dependencies.
Test: go test ./build/soong/cc/...
Change-Id: Ie384089d26459797d0b4b5fef84846507fc508ad
diff --git a/cc/cc.go b/cc/cc.go
index 1f8343d..ef503af 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -2566,6 +2566,10 @@
} else {
ctx.ModuleErrorf("module %q is not a genrule", depName)
}
+ case CrtBeginDepTag:
+ depPaths.CrtBegin = append(depPaths.CrtBegin, android.OutputFileForModule(ctx, dep, ""))
+ case CrtEndDepTag:
+ depPaths.CrtEnd = append(depPaths.CrtEnd, android.OutputFileForModule(ctx, dep, ""))
}
return
}