Use a boolean to determine if linker.config.pb should be generated
vendor and product generate a linker.config.pb even if
`PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS` or
`PRODUCT_PRODUCT_LINKER_CONFIG_FRAGMENTS` are empty respectively. This
CL introduces a new property to determine if a filesystem should
generate a linker.config.pb. The autogenerated vendor and product
filesystem modules will set this property to true.
Test: go test ./filesystem
Bug: 376515221
Change-Id: Ibd007df0d287034f4d227a6054bd83937570ec27
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index bf5dfd9..5880132 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -475,7 +475,8 @@
}
if partitionType == "vendor" || partitionType == "product" {
- fsProps.Linker_config_srcs = f.createLinkerConfigSourceFilegroups(ctx, partitionType)
+ fsProps.Linkerconfig.Gen_linker_config = proptools.BoolPtr(true)
+ fsProps.Linkerconfig.Linker_config_srcs = f.createLinkerConfigSourceFilegroups(ctx, partitionType)
}
var module android.Module