Lines Matching refs:c

242 	for _, c := range r.commands {
243 for _, input := range append(c.inputs, c.implicits...) {
269 for _, c := range r.commands {
270 for _, orderOnly := range c.orderOnlys {
291 for _, c := range r.commands {
292 for _, validation := range c.validations {
311 for _, c := range r.commands {
312 for _, output := range c.outputs {
341 for _, c := range r.commands {
342 for _, depFile := range c.depFiles {
354 for _, c := range r.commands {
355 for _, depFile := range c.depFiles {
370 for _, c := range r.commands {
371 for _, tool := range c.tools {
399 for _, c := range r.commands {
400 for _, rspFile := range c.rspFiles {
410 for _, c := range r.commands {
411 rspFiles = append(rspFiles, c.rspFiles...)
420 for _, c := range r.commands {
421 commands = append(commands, c.String())
524 for _, c := range r.commands {
525 for _, tool := range c.packagedTools {
780 func (c *RuleBuilderCommand) addInput(path Path) string {
782 c.inputs = append(c.inputs, path)
783 return c.PathForInput(path)
786 func (c *RuleBuilderCommand) addImplicit(path Path) {
788 c.implicits = append(c.implicits, path)
791 func (c *RuleBuilderCommand) addOrderOnly(path Path) {
793 c.orderOnlys = append(c.orderOnlys, path)
800 func (c *RuleBuilderCommand) PathForInput(path Path) string {
801 if c.rule.sbox {
802 rel, inSandbox := c.rule._sboxPathForInputRel(path)
815 func (c *RuleBuilderCommand) PathsForInputs(paths Paths) []string {
818 ret[i] = c.PathForInput(path)
827 func (c *RuleBuilderCommand) PathForOutput(path WritablePath) string {
828 if c.rule.sbox {
830 rel, _, _ := maybeRelErr(c.rule.outDir.String(), path.String())
886 func (c *RuleBuilderCommand) PathForPackagedTool(spec PackagingSpec) string {
887 if !c.rule.sboxTools {
897 func (c *RuleBuilderCommand) PathForTool(path Path) string {
898 if c.rule.sbox && c.rule.sboxTools {
899 return filepath.Join(sboxSandboxBaseDir, sboxPathForToolRel(c.rule.ctx, path))
907 func (c *RuleBuilderCommand) PathsForTools(paths Paths) []string {
908 if c.rule.sbox && c.rule.sboxTools {
911 ret = append(ret, filepath.Join(sboxSandboxBaseDir, sboxPathForToolRel(c.rule.ctx, path)))
920 func (c *RuleBuilderCommand) PackagedTool(spec PackagingSpec) *RuleBuilderCommand {
921 if !c.rule.sboxTools {
925 c.packagedTools = append(c.packagedTools, spec)
926 c.Text(sboxPathForPackagedToolRel(spec))
927 return c
932 func (c *RuleBuilderCommand) ImplicitPackagedTool(spec PackagingSpec) *RuleBuilderCommand {
933 if !c.rule.sboxTools {
937 c.packagedTools = append(c.packagedTools, spec)
938 return c
943 func (c *RuleBuilderCommand) ImplicitPackagedTools(specs []PackagingSpec) *RuleBuilderCommand {
944 if !c.rule.sboxTools {
948 c.packagedTools = append(c.packagedTools, specs...)
949 return c
954 func (c *RuleBuilderCommand) Text(text string) *RuleBuilderCommand {
955 if c.buf.Len() > 0 {
956 c.buf.WriteByte(' ')
958 c.buf.WriteString(text)
959 return c
964 func (c *RuleBuilderCommand) Textf(format string, a ...interface{}) *RuleBuilderCommand {
965 return c.Text(fmt.Sprintf(format, a...))
970 func (c *RuleBuilderCommand) Flag(flag string) *RuleBuilderCommand {
971 return c.Text(flag)
976 func (c *RuleBuilderCommand) OptionalFlag(flag *string) *RuleBuilderCommand {
978 c.Text(*flag)
981 return c
986 func (c *RuleBuilderCommand) Flags(flags []string) *RuleBuilderCommand {
988 c.Text(flag)
990 return c
996 func (c *RuleBuilderCommand) FlagWithArg(flag, arg string) *RuleBuilderCommand {
997 return c.Text(flag + arg)
1002 func (c *RuleBuilderCommand) FlagForEachArg(flag string, args []string) *RuleBuilderCommand {
1004 c.FlagWithArg(flag, arg)
1006 return c
1012 func (c *RuleBuilderCommand) FlagWithList(flag string, list []string, sep string) *RuleBuilderComma…
1013 return c.Text(flag + strings.Join(list, sep))
1018 func (c *RuleBuilderCommand) Tool(path Path) *RuleBuilderCommand {
1020 c.tools = append(c.tools, path)
1021 return c.Text(c.PathForTool(path))
1025 func (c *RuleBuilderCommand) ImplicitTool(path Path) *RuleBuilderCommand {
1027 c.tools = append(c.tools, path)
1028 return c
1032 func (c *RuleBuilderCommand) ImplicitTools(paths Paths) *RuleBuilderCommand {
1034 c.ImplicitTool(path)
1036 return c
1045 func (c *RuleBuilderCommand) BuiltTool(tool string) *RuleBuilderCommand {
1046 if c.rule.ctx.Config().UseHostMusl() {
1051 c.ImplicitTool(c.rule.ctx.Config().HostJNIToolPath(c.rule.ctx, "libc_musl"))
1053 return c.builtToolWithoutDeps(tool)
1058 func (c *RuleBuilderCommand) builtToolWithoutDeps(tool string) *RuleBuilderCommand {
1059 return c.Tool(c.rule.ctx.Config().HostToolPath(c.rule.ctx, tool))
1068 func (c *RuleBuilderCommand) PrebuiltBuildTool(ctx PathContext, tool string) *RuleBuilderCommand {
1069 return c.Tool(ctx.Config().PrebuiltBuildTool(ctx, tool))
1074 func (c *RuleBuilderCommand) Input(path Path) *RuleBuilderCommand {
1075 return c.Text(c.addInput(path))
1080 func (c *RuleBuilderCommand) Inputs(paths Paths) *RuleBuilderCommand {
1082 c.Input(path)
1084 return c
1089 func (c *RuleBuilderCommand) Implicit(path Path) *RuleBuilderCommand {
1090 c.addImplicit(path)
1091 return c
1096 func (c *RuleBuilderCommand) Implicits(paths Paths) *RuleBuilderCommand {
1098 c.addImplicit(path)
1100 return c
1104 func (c *RuleBuilderCommand) GetImplicits() Paths {
1105 return c.implicits
1110 func (c *RuleBuilderCommand) OrderOnly(path Path) *RuleBuilderCommand {
1111 c.addOrderOnly(path)
1112 return c
1117 func (c *RuleBuilderCommand) OrderOnlys(paths Paths) *RuleBuilderCommand {
1119 c.addOrderOnly(path)
1121 return c
1126 func (c *RuleBuilderCommand) Validation(path Path) *RuleBuilderCommand {
1128 c.validations = append(c.validations, path)
1129 return c
1134 func (c *RuleBuilderCommand) Validations(paths Paths) *RuleBuilderCommand {
1136 c.Validation(path)
1138 return c
1143 func (c *RuleBuilderCommand) Output(path WritablePath) *RuleBuilderCommand {
1145 c.outputs = append(c.outputs, path)
1146 return c.Text(c.PathForOutput(path))
1151 func (c *RuleBuilderCommand) Outputs(paths WritablePaths) *RuleBuilderCommand {
1153 c.Output(path)
1155 return c
1160 func (c *RuleBuilderCommand) OutputDir(subPathComponents ...string) *RuleBuilderCommand {
1161 if !c.rule.sbox {
1168 return c.Text(path)
1174 func (c *RuleBuilderCommand) DepFile(path WritablePath) *RuleBuilderCommand {
1176 c.depFiles = append(c.depFiles, path)
1177 return c.Text(c.PathForOutput(path))
1182 func (c *RuleBuilderCommand) ImplicitOutput(path WritablePath) *RuleBuilderCommand {
1183 c.outputs = append(c.outputs, path)
1184 return c
1189 func (c *RuleBuilderCommand) ImplicitOutputs(paths WritablePaths) *RuleBuilderCommand {
1190 c.outputs = append(c.outputs, paths...)
1191 return c
1198 func (c *RuleBuilderCommand) ImplicitDepFile(path WritablePath) *RuleBuilderCommand {
1199 c.depFiles = append(c.depFiles, path)
1200 return c
1205 func (c *RuleBuilderCommand) FlagWithInput(flag string, path Path) *RuleBuilderCommand {
1206 return c.Text(flag + c.addInput(path))
1212 func (c *RuleBuilderCommand) FlagWithInputList(flag string, paths Paths, sep string) *RuleBuilderCo…
1215 strs[i] = c.addInput(path)
1217 return c.FlagWithList(flag, strs, sep)
1223 func (c *RuleBuilderCommand) FlagForEachInput(flag string, paths Paths) *RuleBuilderCommand {
1225 c.FlagWithInput(flag, path)
1227 return c
1232 func (c *RuleBuilderCommand) FlagWithOutput(flag string, path WritablePath) *RuleBuilderCommand {
1233 c.outputs = append(c.outputs, path)
1234 return c.Text(flag + c.PathForOutput(path))
1239 func (c *RuleBuilderCommand) FlagWithDepFile(flag string, path WritablePath) *RuleBuilderCommand {
1240 c.depFiles = append(c.depFiles, path)
1241 return c.Text(flag + c.PathForOutput(path))
1249 func (c *RuleBuilderCommand) FlagWithRspFileInputList(flag string, rspFile WritablePath, paths Path…
1256 c.rspFiles = append(c.rspFiles, rspFileAndPaths{rspFile, paths})
1258 if c.rule.sbox {
1259 if _, isRel, _ := maybeRelErr(c.rule.outDir.String(), rspFile.String()); isRel {
1261 rspFile.String(), c.rule.outDir.String()))
1265 c.FlagWithArg(flag, c.PathForInput(rspFile))
1266 return c
1270 func (c *RuleBuilderCommand) String() string {
1271 return c.buf.String()
1290 for i, c := range b {
1291 valid := (c >= 'a' && c <= 'z') ||
1292 (c >= 'A' && c <= 'Z') ||
1293 (c >= '0' && c <= '9') ||
1294 (c == '_') ||
1295 (c == '-') ||
1296 (c == '.')