From fee270187d49304460e1db46c0a29fd0e97a832c Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Fri, 13 Dec 2024 14:10:31 -0800 Subject: 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 --- filesystem/system_image.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'filesystem/system_image.go') 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) } -- cgit v1.2.3-59-g8ed1b