Add embedded_exec and exec_aspect.

exec_aspect tells a rule what the dependent target's
args and env are. Normally, they are only available
to `bazel run` and `bazel test` commands.

embedded_exec creates a script that runs the given
executable with its env and args. This removes
the env and args dependency so that we can
use $(rootpath) on the executable directly
to achieve the same effect of `bazel run`.

Test: manual
Test: bazel test //build/bazel_common_rules/exec/tests
  (see next CL)
Bug: 229350514
Bug: 228560650

Change-Id: I010e987618c31713d2018faf6b8dbe5310bcc1da
3 files changed
tree: f0fe8e61999ef360836d482939fb9095ddc514ea
  1. dist/
  2. docs/
  3. exec/
  4. OWNERS
  5. 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.