genrule: Make cmd configurable

Bug: 325067608
Bug: 325444956
Test: m
Test: m [custom genrule with select]
Change-Id: I3a2307a8d0f65ee419b935a30742f96e5733a81f
diff --git a/genrule/genrule.go b/genrule/genrule.go
index dd980cb..26dad01 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -126,7 +126,7 @@
 	//  $(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 @@
 	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)
 	}