summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
author Sundong Ahn <sundongahn@google.com> 2022-01-12 03:29:17 +0000
committer Sundong Ahn <sundongahn@google.com> 2022-01-12 03:29:17 +0000
commita5c5b9c845254b1d16668ddf3d6523089eb679a2 (patch)
tree6666b505a5be5aecd4f078e121ade7ad1a827952 /sh
parenta52cbd67a365cb4759cfa08f4f252b1a030697e5 (diff)
Support installable property
Support not installing sh_binary when installable property is false Bug: 205065320 Test: m -j Change-Id: I71a0fd24e8867d6cb2527ecdacc775253f12c9f8
Diffstat (limited to 'sh')
-rw-r--r--sh/sh_binary.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index b1d1bb21e..2ab784d52 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -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())
},
},
}}