aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-02-01 18:02:04 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-02-01 18:02:04 +0000
commitf88f7f4345527ca50e3ac46ae3a932b38003daec (patch)
tree9bd132a99b3726fc7bdd923cf3be1732686a2af6
parentf1cef6c828483f5e9da067fa7d1a578805736bef (diff)
parent8ef7561b0cdc19fa997a7ce6fb15aabfc0f5e3db (diff)
downloadblueprint-f88f7f4345527ca50e3ac46ae3a932b38003daec.tar.gz
Snap for 11390602 from 8ef7561b0cdc19fa997a7ce6fb15aabfc0f5e3db to mainline-wifi-releaseaml_wif_341711020aml_wif_341610000
Change-Id: Id3906b7ff85851281b92f4ebe88a6731cbf39ccf
-rw-r--r--Android.bp1
-rw-r--r--bootstrap/bootstrap.go2
-rw-r--r--source_file_provider.go7
3 files changed, 10 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 20fa495..246207a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -52,6 +52,7 @@ bootstrap_go_package {
"provider.go",
"scope.go",
"singleton_ctx.go",
+ "source_file_provider.go"
],
testSrcs: [
"context_test.go",
diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go
index bf12cd3..07d1261 100644
--- a/bootstrap/bootstrap.go
+++ b/bootstrap/bootstrap.go
@@ -338,6 +338,7 @@ func (g *goPackage) GenerateBuildActions(ctx blueprint.ModuleContext) {
buildGoPackage(ctx, g.pkgRoot, g.properties.PkgPath, g.archiveFile,
srcs, genSrcs)
+ ctx.SetProvider(blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs})
}
// A goBinary is a module for building executable binaries from Go sources.
@@ -466,6 +467,7 @@ func (g *goBinary) GenerateBuildActions(ctx blueprint.ModuleContext) {
Validations: testDeps,
Optional: !g.properties.Default,
})
+ ctx.SetProvider(blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs})
}
func buildGoPluginLoader(ctx blueprint.ModuleContext, pkgPath, pluginSrc string) bool {
diff --git a/source_file_provider.go b/source_file_provider.go
new file mode 100644
index 0000000..6ee4d09
--- /dev/null
+++ b/source_file_provider.go
@@ -0,0 +1,7 @@
+package blueprint
+
+type SrcsFileProviderData struct {
+ SrcPaths []string
+}
+
+var SrcsFileProviderKey = NewProvider(SrcsFileProviderData{})