|
11 | 11 | "@prelude//utils:utils.bzl",
|
12 | 12 | "flatten",
|
13 | 13 | )
|
14 |
| -load(":argsfiles.bzl", "CompileArgsfile", "CompileArgsfiles") |
| 14 | +load(":argsfiles.bzl", "CompileArgsfile", "CompileArgsfiles", "get_argsfiles_output") |
15 | 15 | load(":attr_selection.bzl", "cxx_by_language_ext")
|
16 | 16 | load(
|
17 | 17 | ":compiler.bzl",
|
@@ -268,20 +268,10 @@ def create_compile_cmds(
|
268 | 268 | )
|
269 | 269 |
|
270 | 270 | def _get_argsfile_output(ctx: "context", argsfile_by_ext: {str.type: CompileArgsfile.type}, summary_name: str.type) -> CxxCompileCommandArgsFiles.type:
|
271 |
| - argsfiles = [] |
272 |
| - argsfile_names = cmd_args() |
273 |
| - dependent_outputs = [] |
274 |
| - argsfile_artifacts_by_ext = {} |
275 |
| - for ext, argsfile in argsfile_by_ext.items(): |
276 |
| - argsfiles.append(argsfile.file) |
277 |
| - argsfile_names.add(cmd_args(argsfile.file).ignore_artifacts()) |
278 |
| - dependent_outputs.extend(argsfile.input_args) |
279 |
| - argsfile_artifacts_by_ext[ext] = argsfile.file |
280 |
| - |
281 |
| - argsfiles_summary = ctx.actions.write(summary_name, argsfile_names) |
| 271 | + argsfile_artifacts_by_ext = {ext: argsfile.file for ext, argsfile in argsfile_by_ext.items()} |
282 | 272 |
|
283 | 273 | return CxxCompileCommandArgsFiles(
|
284 |
| - info = DefaultInfo(default_outputs = [argsfiles_summary] + argsfiles, other_outputs = dependent_outputs), |
| 274 | + info = get_argsfiles_output(ctx, argsfile_by_ext, summary_name), |
285 | 275 | by_ext = argsfile_artifacts_by_ext,
|
286 | 276 | )
|
287 | 277 |
|
|
0 commit comments