Add RuleBuilderCommand.Flags
Test: rule_builder_test.go
Change-Id: I7887a67aaef33bc591d83fade9175da3e401529f
diff --git a/android/rule_builder.go b/android/rule_builder.go
index a2a5366..ee61b94 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -284,6 +284,15 @@
return c.Text(flag)
}
+// Flags adds the specified raw text to the command line. The text should not contain input or output paths or the
+// rule will not have them listed in its dependencies or outputs.
+func (c *RuleBuilderCommand) Flags(flags []string) *RuleBuilderCommand {
+ for _, flag := range flags {
+ c.Text(flag)
+ }
+ return c
+}
+
// FlagWithArg adds the specified flag and argument text to the command line, with no separator between them. The flag
// and argument should not contain input or output paths or the rule will not have them listed in its dependencies or
// outputs.