summaryrefslogtreecommitdiff
path: root/filesystem/system_image.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2025-01-30 22:23:12 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-01-30 22:23:12 -0800
commita8cacac72a743b6c2d8a4480b3ae6619d22fb2d0 (patch)
tree80a404b78aacfcd340e37991ab92354b31cb156d /filesystem/system_image.go
parent8057bac878c4f15923fab22db11d60bd82596145 (diff)
parent19fbb07dabf3a0a0836e6c4b36fd5584a2d1957b (diff)
Merge "Fix staging dir creation for adevice" into main
Diffstat (limited to 'filesystem/system_image.go')
-rw-r--r--filesystem/system_image.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/filesystem/system_image.go b/filesystem/system_image.go
index 874d20d80..cc9093f9b 100644
--- a/filesystem/system_image.go
+++ b/filesystem/system_image.go
@@ -44,7 +44,12 @@ func (s systemImage) FsProps() FilesystemProperties {
return s.filesystem.properties
}
-func (s *systemImage) BuildLinkerConfigFile(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) {
+func (s *systemImage) BuildLinkerConfigFile(
+ ctx android.ModuleContext,
+ builder *android.RuleBuilder,
+ rebasedDir android.OutputPath,
+ fullInstallPaths *[]FullInstallPathInfo,
+) {
if !proptools.Bool(s.filesystem.properties.Linker_config.Gen_linker_config) {
return
}
@@ -55,6 +60,11 @@ func (s *systemImage) BuildLinkerConfigFile(ctx android.ModuleContext, builder *
intermediateOutput := android.PathForModuleOut(ctx, "linker.config.pb")
linkerconfig.BuildLinkerConfig(ctx, android.PathsForModuleSrc(ctx, s.filesystem.properties.Linker_config.Linker_config_srcs), provideModules, requireModules, intermediateOutput)
builder.Command().Text("cp").Input(intermediateOutput).Output(output)
+
+ *fullInstallPaths = append(*fullInstallPaths, FullInstallPathInfo{
+ FullInstallPath: android.PathForModuleInPartitionInstall(ctx, s.PartitionType(), "etc", "linker.config.pb"),
+ SourcePath: intermediateOutput,
+ })
} else {
// TODO: This branch is the logic that make uses for the linker config file, which is
// different than linkerconfig.BuildLinkerConfig used above. Keeping both branches for now
@@ -87,6 +97,11 @@ func (s *systemImage) BuildLinkerConfigFile(ctx android.ModuleContext, builder *
Implicit(llndkMovedToApexLibraries)
// TODO: Make also supports adding an extra append command with PRODUCT_EXTRA_STUB_LIBRARIES,
// but that variable appears to have no usages.
+
+ *fullInstallPaths = append(*fullInstallPaths, FullInstallPathInfo{
+ FullInstallPath: android.PathForModuleInPartitionInstall(ctx, s.PartitionType(), "etc", "linker.config.pb"),
+ SourcePath: output,
+ })
}
s.appendToEntry(ctx, output)