diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2016-03-01 06:11:27 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-03-01 19:13:31 +0000 |
commit | 9cad21f817237de333c09953eadc4e73b10a18e5 (patch) | |
tree | 119188033d8568bed5fd0a872c2bc5389bc3d760 /tools | |
parent | 3b631f7773287d616f675d6a95c9c6f6410d79b5 (diff) |
pkg: use a flag file instead of passing the list of arguments in the command line
Big pkg can run over the command line limit.
--
MOS_MIGRATED_REVID=115950963
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/pkg/pkg.bzl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/build_defs/pkg/pkg.bzl b/tools/build_defs/pkg/pkg.bzl index 37f3c6b6a4..7992eae7d1 100644 --- a/tools/build_defs/pkg/pkg.bzl +++ b/tools/build_defs/pkg/pkg.bzl @@ -75,11 +75,13 @@ def _pkg_tar_impl(ctx): args += ["--tar=" + f.path for f in ctx.files.deps] args += ["--link=%s:%s" % (k, ctx.attr.symlinks[k]) for k in ctx.attr.symlinks] + arg_file = ctx.new_file(ctx.label.name + ".args") + ctx.file_action(arg_file, "\n".join(args)) ctx.action( executable = build_tar, - arguments = args, - inputs = ctx.files.files + ctx.files.deps, + arguments = ["--flagfile=" + arg_file.path], + inputs = ctx.files.files + ctx.files.deps + [arg_file], outputs = [ctx.outputs.out], mnemonic="PackageTar" ) |