summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.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/filesystem.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/filesystem.go')
-rw-r--r--filesystem/filesystem.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index bff0a1014..eb39a78c6 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -886,8 +886,10 @@ func (f *filesystem) BuildLinkerConfigFile(ctx android.ModuleContext, builder *a
}
provideModules, _ := f.getLibsForLinkerConfig(ctx)
+ intermediateOutput := android.PathForModuleOut(ctx, "linker.config.pb")
+ linkerconfig.BuildLinkerConfig(ctx, android.PathsForModuleSrc(ctx, f.properties.Linker_config.Linker_config_srcs), provideModules, nil, intermediateOutput)
output := rebasedDir.Join(ctx, "etc", "linker.config.pb")
- linkerconfig.BuildLinkerConfig(ctx, builder, android.PathsForModuleSrc(ctx, f.properties.Linker_config.Linker_config_srcs), provideModules, nil, output)
+ builder.Command().Text("cp").Input(intermediateOutput).Output(output)
f.appendToEntry(ctx, output)
}