Add --strip_components support to dist rule.

This supports disting files up to a specific shared package level.

e.g. for the following files to dist:

a/b/b.txt
a/c/c.txt

with --strip_components=1 and --dist_dir=/dist, the resulting output is:

/dist/b/b.txt
/dist/c/c.txt

This works the same as tar(1)'s --strip.

Bug: 238723069
Change-Id: Ibf0ac467048dff92e6f34d3f70222f7a4f342d27
2 files changed
tree: 28fa55bc117435d8ce97c91000ba0f42e8615967
  1. dist/
  2. docs/
  3. exec/
  4. test_mappings/
  5. workspace/
  6. OWNERS
  7. README.md
README.md

Bazel Common Rules

This directory contains common Bazel rules and tools shared between the Platform and Kernel builds.

For platform-specific rules, place them in the platform checkout's //build/bazel/rules directory.

For kernel-specific rules, place them in kernel checkout's //build/kleaf directory.