From ed7a10d6170049877a07cf27edaf8db65d17f77b Mon Sep 17 00:00:00 2001 From: oquenchil <23365806+oquenchil@users.noreply.github.com> Date: Wed, 2 Mar 2022 11:05:27 +0100 Subject: [PATCH] Add param file for def parser action (#14925) --- src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl b/src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl index 0e4037cc9649c5..97a2691891cea8 100644 --- a/src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl @@ -173,16 +173,19 @@ def _should_generate_def_file(ctx, feature_configuration): def _generate_def_file(ctx, def_parser, object_files, dll_name): def_file = ctx.actions.declare_file(ctx.label.name + ".gen.def") + args = ctx.actions.args() + args.add(def_file) + args.add(dll_name) argv = ctx.actions.args() - argv.add(def_file) - argv.add(dll_name) + argv.use_param_file("@%s", use_always = True) + argv.set_param_file_format("shell") for object_file in object_files: argv.add(object_file.path) ctx.actions.run( mnemonic = "DefParser", executable = def_parser, - arguments = [argv], + arguments = [args, argv], inputs = object_files, outputs = [def_file], use_default_shell_env = True,