summaryrefslogtreecommitdiff
path: root/genrule
diff options
context:
space:
mode:
author Inseob Kim <inseob@google.com> 2024-10-25 17:02:21 +0900
committer Inseob Kim <inseob@google.com> 2024-11-04 10:31:20 +0900
commit93036a5ff25c7e559e110899b81b09eff58f62db (patch)
tree0af4298b269650a6b4a4102833e224a136a728aa /genrule
parenta8bf946a22d5e7022c5fd2c748da226f0ee0a16e (diff)
Add DirectoryPath for nsjail genrule
This adds a new interface DirectoryPath representing directories specified by dirgroup modules. As directories are not regular files, DirectoryPath is meant to be incompatible with regular Path. Bug: 375551969 Test: m nsjail_genrule_test Change-Id: I55806121a3a222a8b02f1a080f25448d425447b3
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 1ab137837..1282bfbae 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -231,7 +231,7 @@ type generateTask struct {
// For nsjail tasks
useNsjail bool
- dirSrcs android.Paths
+ dirSrcs android.DirectoryPaths
}
func (g *Module) GeneratedSourceFiles() android.Paths {
@@ -604,7 +604,8 @@ func (g *Module) generateCommonBuildActions(ctx android.ModuleContext) {
if task.useNsjail {
for _, input := range task.dirSrcs {
- cmd.Implicit(input)
+ cmd.ImplicitDirectory(input)
+ // TODO(b/375551969): remove glob
if paths, err := ctx.GlobWithDeps(filepath.Join(input.String(), "**/*"), nil); err == nil {
rule.NsjailImplicits(android.PathsForSource(ctx, paths))
} else {