Add sh_binary[_host] for shell script that should be installed as executable

We've been putting these in cc_prebuilt_binary, but that's not really
correct. It also tries adding '.exe' to the end of windows executables,
which isn't desirable for bat files.

Test: Use sh_binary_host
Change-Id: Idd5418dceb81ac55b766c987fbb69a810aeb8a3b
This commit is contained in:
Dan Willemsen
2019-01-25 16:04:11 -08:00
parent ee04139154
commit b05526711e
3 changed files with 144 additions and 1 deletions

View File

@@ -125,7 +125,8 @@ func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx ModuleContext) {
p.outputFilePath = PathForModuleOut(ctx, filename).OutputPath
p.installDirPath = PathForModuleInstall(ctx, "etc", String(p.properties.Sub_dir))
// This ensures that outputFilePath has the same name as this module.
// This ensures that outputFilePath has the correct name for others to
// use, as the source file may have a different name.
ctx.Build(pctx, BuildParams{
Rule: Cp,
Output: p.outputFilePath,