From 9263188d99be646e559bb78777c65f8516b3d0a7 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Mon, 28 Oct 2024 22:49:38 +0000 Subject: Add linker.config.pb support to android_filesystem As part of the mk->bp conversion, all modules and partitions will eventually be built with Soong. vendor.img (built with kati) uses some rules in build/make/core to install a /etc/linker.config.pb file. This CL adds this logic to `android_filesystem`. This soong module will eventually be used to build vendor.img There are two main inputs to linker.config.pb generation for vendor. 1. PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS, a list of json files 2. List of stub libraries installed in vendor (1) will be passed to `android_filesystem` as `Linker_config_srcs`. (2) has a subtle difference between kati and soong implementation. Kati uses `SOONG_STUB_VENDOR_LIBRARIES` to determine the list of all vendor stub libraries in the tree, and then uses `--system $TARGET_OUT/vendor` to filter in the libraries which are actually installed. For the Soong implementation, this will be replaced with ctx.VisitDirectDeps, followed by child.HasStubVariants Test: go test ./filesystem Bug: 375686533 Change-Id: I6f9130d2aa866dcac9272b71939e40ed50a952ac --- filesystem/system_image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filesystem/system_image.go') diff --git a/filesystem/system_image.go b/filesystem/system_image.go index 7dbf98644..6200df44d 100644 --- a/filesystem/system_image.go +++ b/filesystem/system_image.go @@ -94,7 +94,7 @@ func (s *systemImage) buildLinkerConfigFile(ctx android.ModuleContext, root andr }) builder := android.NewRuleBuilder(pctx, ctx) - linkerconfig.BuildLinkerConfig(ctx, builder, input, provideModules, requireModules, output) + linkerconfig.BuildLinkerConfig(ctx, builder, android.Paths{input}, provideModules, requireModules, output) builder.Build("conv_linker_config", "Generate linker config protobuf "+output.String()) return output } -- cgit v1.2.3-59-g8ed1b