summaryrefslogtreecommitdiff
path: root/filesystem/system_image.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-12-13 14:10:31 -0800
committer Cole Faust <colefaust@google.com> 2024-12-13 14:47:21 -0800
commitfee270187d49304460e1db46c0a29fd0e97a832c (patch)
tree13f26f974d962b772a5f2d3d295933e2946d8734 /filesystem/system_image.go
parentc6f264854e38c6f4964409902eb20832d764d2d4 (diff)
Make BuildLinkerConfig run in its own action
We should probably do this change for more parts of the filesystem RuleBuilder. Moving the linker config action out of the filesystem rulebuilder allows it to run in parallel with opther actions, and not rerun every time the filesystem is rebuilt. Bug: 384091387 Test: Presubmits Change-Id: Ic7305c555260fb5d9900c6c709b6c81dc0708d2b
Diffstat (limited to 'filesystem/system_image.go')
-rw-r--r--filesystem/system_image.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/filesystem/system_image.go b/filesystem/system_image.go
index 60a513346..57ce10f68 100644
--- a/filesystem/system_image.go
+++ b/filesystem/system_image.go
@@ -49,8 +49,10 @@ func (s *systemImage) BuildLinkerConfigFile(ctx android.ModuleContext, builder *
}
provideModules, requireModules := s.getLibsForLinkerConfig(ctx)
+ intermediateOutput := android.PathForModuleOut(ctx, "linker.config.pb")
+ linkerconfig.BuildLinkerConfig(ctx, android.PathsForModuleSrc(ctx, s.filesystem.properties.Linker_config.Linker_config_srcs), provideModules, requireModules, intermediateOutput)
output := rebasedDir.Join(ctx, "etc", "linker.config.pb")
- linkerconfig.BuildLinkerConfig(ctx, builder, android.PathsForModuleSrc(ctx, s.filesystem.properties.Linker_config.Linker_config_srcs), provideModules, requireModules, output)
+ builder.Command().Text("cp").Input(intermediateOutput).Output(output)
s.appendToEntry(ctx, output)
}