raw_binary output should not be executable.
If it is, rust_test (wrongly) tries to execute it when it is used as data. Also fixed description and a lint warning while I was at it. Bug: 233732515 Test: atest vmbase_example.integration_test Change-Id: I49bf5147a9908549b0f37bdb0678e77676148db8
This commit is contained in:
@@ -26,7 +26,8 @@ import (
|
|||||||
var (
|
var (
|
||||||
toRawBinary = pctx.AndroidStaticRule("toRawBinary",
|
toRawBinary = pctx.AndroidStaticRule("toRawBinary",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: "${objcopy} --output-target=binary ${in} ${out}",
|
Command: "${objcopy} --output-target=binary ${in} ${out} &&" +
|
||||||
|
"chmod -x ${out}",
|
||||||
CommandDeps: []string{"$objcopy"},
|
CommandDeps: []string{"$objcopy"},
|
||||||
},
|
},
|
||||||
"objcopy")
|
"objcopy")
|
||||||
@@ -76,7 +77,7 @@ func (r *rawBinary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: toRawBinary,
|
Rule: toRawBinary,
|
||||||
Description: "prefix symbols " + outputFile.Base(),
|
Description: "raw binary " + outputFile.Base(),
|
||||||
Output: outputFile,
|
Output: outputFile,
|
||||||
Input: inputFile,
|
Input: inputFile,
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
@@ -93,7 +94,7 @@ var _ android.AndroidMkEntriesProvider = (*rawBinary)(nil)
|
|||||||
|
|
||||||
// Implements android.AndroidMkEntriesProvider
|
// Implements android.AndroidMkEntriesProvider
|
||||||
func (r *rawBinary) AndroidMkEntries() []android.AndroidMkEntries {
|
func (r *rawBinary) AndroidMkEntries() []android.AndroidMkEntries {
|
||||||
return []android.AndroidMkEntries{android.AndroidMkEntries{
|
return []android.AndroidMkEntries{{
|
||||||
Class: "ETC",
|
Class: "ETC",
|
||||||
OutputFile: android.OptionalPathForPath(r.output),
|
OutputFile: android.OptionalPathForPath(r.output),
|
||||||
}}
|
}}
|
||||||
|
Reference in New Issue
Block a user