Make binaries executable
Split InstallFileName into InstallExecutable that does chmod +x after copying the file. Also remove InstallFile and rename InstallFileName to InstallFile. Test: m -j checkbuild Change-Id: Id41ad4eafe521f6cd5d8cc250b7747ecb3da8dfc
This commit is contained in:
@@ -457,7 +457,7 @@ type Library struct {
|
||||
func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
j.compile(ctx)
|
||||
|
||||
j.installFile = ctx.InstallFileName(android.PathForModuleInstall(ctx, "framework"), ctx.ModuleName()+".jar", j.outputFile)
|
||||
j.installFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"), ctx.ModuleName()+".jar", j.outputFile)
|
||||
}
|
||||
|
||||
func (j *Library) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
@@ -510,8 +510,8 @@ func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
// Depend on the installed jar (j.installFile) so that the wrapper doesn't get executed by
|
||||
// another build rule before the jar has been installed.
|
||||
j.wrapperFile = android.PathForModuleSrc(ctx, j.binaryProperties.Wrapper)
|
||||
j.binaryFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "bin"),
|
||||
j.wrapperFile, j.installFile)
|
||||
j.binaryFile = ctx.InstallExecutable(android.PathForModuleInstall(ctx, "bin"),
|
||||
ctx.ModuleName(), j.wrapperFile, j.installFile)
|
||||
}
|
||||
|
||||
func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
@@ -590,7 +590,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
j.combinedClasspathFile = TransformClassesToJar(ctx, j.classJarSpecs, android.OptionalPath{}, nil)
|
||||
|
||||
ctx.InstallFileName(android.PathForModuleInstall(ctx, "framework"),
|
||||
ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"),
|
||||
ctx.ModuleName()+".jar", j.combinedClasspathFile)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user