diff options
author | 2024-06-03 15:23:56 +0100 | |
---|---|---|
committer | 2024-06-04 18:20:29 +0100 | |
commit | 1eb06c4a67c15a80b62b37c66ab1e82625e214e6 (patch) | |
tree | 4a604406228cde5d2766efb3f4159397e55f988c /genrule | |
parent | d5e16ac52be02e2c41c47964a3b5dbc776bd6799 (diff) |
genrule: Make cmd configurable
Bug: 325067608
Bug: 325444956
Test: m
Test: m [custom genrule with select]
Change-Id: I3a2307a8d0f65ee419b935a30742f96e5733a81f
Diffstat (limited to 'genrule')
-rw-r--r-- | genrule/genrule.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go index dd980cbb0..26dad01e7 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -126,7 +126,7 @@ type generatorProperties struct { // $(out): a single output file. // $(genDir): the sandbox directory for this tool; contains $(out). // $$: a literal $ - Cmd *string + Cmd proptools.Configurable[string] `android:"replace_instead_of_append"` // name of the modules (if any) that produces the host executable. Leave empty for // prebuilts or scripts that do not need a module to build them. @@ -403,7 +403,7 @@ func (g *Module) generateCommonBuildActions(ctx android.ModuleContext) { var outputFiles android.WritablePaths var zipArgs strings.Builder - cmd := String(g.properties.Cmd) + cmd := g.properties.Cmd.GetOrDefault(ctx, "") if g.CmdModifier != nil { cmd = g.CmdModifier(ctx, cmd) } |