| <aid="mtree_spec-srcs"></a>srcs | Files that are placed into the tar | <ahref="https://bazel.build/concepts/labels">List of labels</a> | required | |
| <aid="tar_rule-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <aid="tar_rule-args"></a>args | Additional flags permitted by BSD tar; see the man page. | List of strings | optional | <code>[]</code> |
| <aid="tar_rule-compress"></a>compress | Compress the archive file with a supported algorithm. | String | optional | <code>""</code> |
| <aid="tar_rule-mode"></a>mode | A mode indicator from the following list, copied from the tar manpage:<br><br> - create: Create a new archive containing the specified items. - append: Like <code>create</code>, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - list: List archive contents to stdout. - update: Like <code>append</code>, but new entries are added only if they have a modification date newer than the corresponding entry in the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - extract: Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. | String | optional | <code>"create"</code> |
| <aid="tar_rule-out"></a>out | Resulting tar file to write. If absent, <code>[name].tar</code> is written. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | |
| <aid="tar_rule-srcs"></a>srcs | Files, directories, or other targets whose default outputs are placed into the tar.<br><br> If any of the srcs are binaries with runfiles, those are copied into the resulting tar as well. | <ahref="https://bazel.build/concepts/labels">List of labels</a> | required | |
| <aid="tar-mtree"></a>mtree | "auto", or an array of specification lines, or a label of a file that contains the lines. Subject to [$(location)](https://bazel.build/reference/be/make-variables#predefined_label_variables) and ["Make variable"](https://bazel.build/reference/be/make-variables) substitution. | <code>"auto"</code> |
| <aid="tar-stamp"></a>stamp | should mtree attribute be stamped | <code>0</code> |