Merge "Support installable property" am: 33b4812ce1

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1944807

Change-Id: I6665f9fd718bff6c9f5dbacbbb5f7a3a147dbab2
This commit is contained in:
Treehugger Robot
2022-01-14 00:13:27 +00:00
committed by Automerger Merge Worker

View File

@@ -268,6 +268,9 @@ func (s *ShBinary) generateAndroidBuildActions(ctx android.ModuleContext) {
func (s *ShBinary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
s.generateAndroidBuildActions(ctx)
installDir := android.PathForModuleInstall(ctx, "bin", proptools.String(s.properties.Sub_dir))
if !s.Installable() {
s.SkipInstall()
}
s.installedFile = ctx.InstallExecutable(installDir, s.outputFilePath.Base(), s.outputFilePath)
for _, symlink := range s.Symlinks() {
ctx.InstallSymlink(installDir, symlink, s.installedFile)
@@ -283,6 +286,7 @@ func (s *ShBinary) AndroidMkEntries() []android.AndroidMkEntries {
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
s.customAndroidMkEntries(entries)
entries.SetString("LOCAL_MODULE_RELATIVE_PATH", proptools.String(s.properties.Sub_dir))
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !s.Installable())
},
},
}}