Allow uninstallable linker_config to be packaged
Till now, linker_config has to be installable to be packaged. With this
commit, packaging modules like filesystem now can include uninstallable
linker_config. This can help when linker_config can conflict with other
partitions e.g. system.
Bug: 185391776
Test: build filesystem with uninstallable linker_config
Change-Id: Ic2cece08be73749e6bd1f813152c67f8e3904c20
diff --git a/linkerconfig/linkerconfig.go b/linkerconfig/linkerconfig.go
index da80a47..0ed7409 100644
--- a/linkerconfig/linkerconfig.go
+++ b/linkerconfig/linkerconfig.go
@@ -81,9 +81,10 @@
linkerConfigRule.Build("conv_linker_config",
"Generate linker config protobuf "+l.outputFilePath.String())
- if proptools.BoolDefault(l.properties.Installable, true) {
- ctx.InstallFile(l.installDirPath, l.outputFilePath.Base(), l.outputFilePath)
+ if !proptools.BoolDefault(l.properties.Installable, true) {
+ l.SkipInstall()
}
+ ctx.InstallFile(l.installDirPath, l.outputFilePath.Base(), l.outputFilePath)
}
// linker_config generates protobuf file from json file. This protobuf file will be used from