Lines Matching refs:c
241 for _, c := range r.commands {
242 for _, input := range append(c.inputs, c.implicits...) {
268 for _, c := range r.commands {
269 for _, orderOnly := range c.orderOnlys {
290 for _, c := range r.commands {
291 for _, validation := range c.validations {
310 for _, c := range r.commands {
311 for _, output := range c.outputs {
340 for _, c := range r.commands {
341 for _, symlinkOutput := range c.symlinkOutputs {
375 for _, c := range r.commands {
376 for _, depFile := range c.depFiles {
388 for _, c := range r.commands {
389 for _, depFile := range c.depFiles {
404 for _, c := range r.commands {
405 for _, tool := range c.tools {
433 for _, c := range r.commands {
434 for _, rspFile := range c.rspFiles {
444 for _, c := range r.commands {
445 rspFiles = append(rspFiles, c.rspFiles...)
454 for _, c := range r.commands {
455 commands = append(commands, c.String())
548 for _, c := range r.commands {
549 for _, tool := range c.packagedTools {
767 func (c *RuleBuilderCommand) addInput(path Path) string {
768 c.inputs = append(c.inputs, path)
769 return c.PathForInput(path)
772 func (c *RuleBuilderCommand) addImplicit(path Path) {
773 c.implicits = append(c.implicits, path)
776 func (c *RuleBuilderCommand) addOrderOnly(path Path) {
777 c.orderOnlys = append(c.orderOnlys, path)
784 func (c *RuleBuilderCommand) PathForInput(path Path) string {
785 if c.rule.sbox {
786 rel, inSandbox := c.rule._sboxPathForInputRel(path)
799 func (c *RuleBuilderCommand) PathsForInputs(paths Paths) []string {
802 ret[i] = c.PathForInput(path)
811 func (c *RuleBuilderCommand) PathForOutput(path WritablePath) string {
812 if c.rule.sbox {
814 rel, _, _ := maybeRelErr(c.rule.outDir.String(), path.String())
869 func (c *RuleBuilderCommand) PathForPackagedTool(spec PackagingSpec) string {
870 if !c.rule.sboxTools {
880 func (c *RuleBuilderCommand) PathForTool(path Path) string {
881 if c.rule.sbox && c.rule.sboxTools {
882 return filepath.Join(sboxSandboxBaseDir, sboxPathForToolRel(c.rule.ctx, path))
890 func (c *RuleBuilderCommand) PathsForTools(paths Paths) []string {
891 if c.rule.sbox && c.rule.sboxTools {
894 ret = append(ret, filepath.Join(sboxSandboxBaseDir, sboxPathForToolRel(c.rule.ctx, path)))
903 func (c *RuleBuilderCommand) PackagedTool(spec PackagingSpec) *RuleBuilderCommand {
904 if !c.rule.sboxTools {
908 c.packagedTools = append(c.packagedTools, spec)
909 c.Text(sboxPathForPackagedToolRel(spec))
910 return c
915 func (c *RuleBuilderCommand) ImplicitPackagedTool(spec PackagingSpec) *RuleBuilderCommand {
916 if !c.rule.sboxTools {
920 c.packagedTools = append(c.packagedTools, spec)
921 return c
926 func (c *RuleBuilderCommand) ImplicitPackagedTools(specs []PackagingSpec) *RuleBuilderCommand {
927 if !c.rule.sboxTools {
931 c.packagedTools = append(c.packagedTools, specs...)
932 return c
937 func (c *RuleBuilderCommand) Text(text string) *RuleBuilderCommand {
938 if c.buf.Len() > 0 {
939 c.buf.WriteByte(' ')
941 c.buf.WriteString(text)
942 return c
947 func (c *RuleBuilderCommand) Textf(format string, a ...interface{}) *RuleBuilderCommand {
948 return c.Text(fmt.Sprintf(format, a...))
953 func (c *RuleBuilderCommand) Flag(flag string) *RuleBuilderCommand {
954 return c.Text(flag)
959 func (c *RuleBuilderCommand) OptionalFlag(flag *string) *RuleBuilderCommand {
961 c.Text(*flag)
964 return c
969 func (c *RuleBuilderCommand) Flags(flags []string) *RuleBuilderCommand {
971 c.Text(flag)
973 return c
979 func (c *RuleBuilderCommand) FlagWithArg(flag, arg string) *RuleBuilderCommand {
980 return c.Text(flag + arg)
985 func (c *RuleBuilderCommand) FlagForEachArg(flag string, args []string) *RuleBuilderCommand {
987 c.FlagWithArg(flag, arg)
989 return c
995 func (c *RuleBuilderCommand) FlagWithList(flag string, list []string, sep string) *RuleBuilderComma…
996 return c.Text(flag + strings.Join(list, sep))
1001 func (c *RuleBuilderCommand) Tool(path Path) *RuleBuilderCommand {
1002 c.tools = append(c.tools, path)
1003 return c.Text(c.PathForTool(path))
1007 func (c *RuleBuilderCommand) ImplicitTool(path Path) *RuleBuilderCommand {
1008 c.tools = append(c.tools, path)
1009 return c
1013 func (c *RuleBuilderCommand) ImplicitTools(paths Paths) *RuleBuilderCommand {
1014 c.tools = append(c.tools, paths...)
1015 return c
1023 func (c *RuleBuilderCommand) BuiltTool(tool string) *RuleBuilderCommand {
1024 return c.Tool(c.rule.ctx.Config().HostToolPath(c.rule.ctx, tool))
1032 func (c *RuleBuilderCommand) PrebuiltBuildTool(ctx PathContext, tool string) *RuleBuilderCommand {
1033 return c.Tool(ctx.Config().PrebuiltBuildTool(ctx, tool))
1038 func (c *RuleBuilderCommand) Input(path Path) *RuleBuilderCommand {
1039 return c.Text(c.addInput(path))
1044 func (c *RuleBuilderCommand) Inputs(paths Paths) *RuleBuilderCommand {
1046 c.Input(path)
1048 return c
1053 func (c *RuleBuilderCommand) Implicit(path Path) *RuleBuilderCommand {
1054 c.addImplicit(path)
1055 return c
1060 func (c *RuleBuilderCommand) Implicits(paths Paths) *RuleBuilderCommand {
1062 c.addImplicit(path)
1064 return c
1068 func (c *RuleBuilderCommand) GetImplicits() Paths {
1069 return c.implicits
1074 func (c *RuleBuilderCommand) OrderOnly(path Path) *RuleBuilderCommand {
1075 c.addOrderOnly(path)
1076 return c
1081 func (c *RuleBuilderCommand) OrderOnlys(paths Paths) *RuleBuilderCommand {
1083 c.addOrderOnly(path)
1085 return c
1090 func (c *RuleBuilderCommand) Validation(path Path) *RuleBuilderCommand {
1091 c.validations = append(c.validations, path)
1092 return c
1097 func (c *RuleBuilderCommand) Validations(paths Paths) *RuleBuilderCommand {
1098 c.validations = append(c.validations, paths...)
1099 return c
1104 func (c *RuleBuilderCommand) Output(path WritablePath) *RuleBuilderCommand {
1105 c.outputs = append(c.outputs, path)
1106 return c.Text(c.PathForOutput(path))
1111 func (c *RuleBuilderCommand) Outputs(paths WritablePaths) *RuleBuilderCommand {
1113 c.Output(path)
1115 return c
1120 func (c *RuleBuilderCommand) OutputDir() *RuleBuilderCommand {
1121 if !c.rule.sbox {
1124 return c.Text(sboxOutDir)
1130 func (c *RuleBuilderCommand) DepFile(path WritablePath) *RuleBuilderCommand {
1131 c.depFiles = append(c.depFiles, path)
1132 return c.Text(c.PathForOutput(path))
1137 func (c *RuleBuilderCommand) ImplicitOutput(path WritablePath) *RuleBuilderCommand {
1138 c.outputs = append(c.outputs, path)
1139 return c
1144 func (c *RuleBuilderCommand) ImplicitOutputs(paths WritablePaths) *RuleBuilderCommand {
1145 c.outputs = append(c.outputs, paths...)
1146 return c
1152 func (c *RuleBuilderCommand) ImplicitSymlinkOutput(path WritablePath) *RuleBuilderCommand {
1153 c.symlinkOutputs = append(c.symlinkOutputs, path)
1154 return c.ImplicitOutput(path)
1160 func (c *RuleBuilderCommand) ImplicitSymlinkOutputs(paths WritablePaths) *RuleBuilderCommand {
1162 c.ImplicitSymlinkOutput(path)
1164 return c
1169 func (c *RuleBuilderCommand) SymlinkOutput(path WritablePath) *RuleBuilderCommand {
1170 c.symlinkOutputs = append(c.symlinkOutputs, path)
1171 return c.Output(path)
1176 func (c *RuleBuilderCommand) SymlinkOutputs(paths WritablePaths) *RuleBuilderCommand {
1178 c.SymlinkOutput(path)
1180 return c
1187 func (c *RuleBuilderCommand) ImplicitDepFile(path WritablePath) *RuleBuilderCommand {
1188 c.depFiles = append(c.depFiles, path)
1189 return c
1194 func (c *RuleBuilderCommand) FlagWithInput(flag string, path Path) *RuleBuilderCommand {
1195 return c.Text(flag + c.addInput(path))
1201 func (c *RuleBuilderCommand) FlagWithInputList(flag string, paths Paths, sep string) *RuleBuilderCo…
1204 strs[i] = c.addInput(path)
1206 return c.FlagWithList(flag, strs, sep)
1212 func (c *RuleBuilderCommand) FlagForEachInput(flag string, paths Paths) *RuleBuilderCommand {
1214 c.FlagWithInput(flag, path)
1216 return c
1221 func (c *RuleBuilderCommand) FlagWithOutput(flag string, path WritablePath) *RuleBuilderCommand {
1222 c.outputs = append(c.outputs, path)
1223 return c.Text(flag + c.PathForOutput(path))
1228 func (c *RuleBuilderCommand) FlagWithDepFile(flag string, path WritablePath) *RuleBuilderCommand {
1229 c.depFiles = append(c.depFiles, path)
1230 return c.Text(flag + c.PathForOutput(path))
1238 func (c *RuleBuilderCommand) FlagWithRspFileInputList(flag string, rspFile WritablePath, paths Path…
1245 c.rspFiles = append(c.rspFiles, rspFileAndPaths{rspFile, paths})
1247 if c.rule.sbox {
1248 if _, isRel, _ := maybeRelErr(c.rule.outDir.String(), rspFile.String()); isRel {
1250 rspFile.String(), c.rule.outDir.String()))
1254 c.FlagWithArg(flag, c.PathForInput(rspFile))
1255 return c
1259 func (c *RuleBuilderCommand) String() string {
1260 return c.buf.String()
1279 for i, c := range b {
1280 valid := (c >= 'a' && c <= 'z') ||
1281 (c >= 'A' && c <= 'Z') ||
1282 (c >= '0' && c <= '9') ||
1283 (c == '_') ||
1284 (c == '-') ||
1285 (c == '.')