Bug: 206149924

Clone this repo:

Branches

  1. e8cfa98 interceptor: Skip --param. by Yifan Hong · 2 years, 6 months ago main master
  2. dc5d390 Add -x to skipped argument for clang. by Yifan Hong · 2 years, 11 months ago
  3. f298da8 add readme.md by Yifan Hong · 2 years, 11 months ago
  4. 65cc9ba main: ensure the correct return code is emitted by Matthias Maennich · 2 years, 11 months ago
  5. d11a88c interceptor: give analyzers names by Matthias Maennich · 3 years ago

Interceptor

WARNING: The interceptor is still a work in progress. Contents of this section are subject to change.

The interceptor is a tool to intercept all execve and other system calls during the build (specifically, make) in order to construct the dependency tree and understand a list of commands executed by the build system. With the interceptor, the Bazel build system may first “dry-run”, analyze all inputs and outputs of each command, generate BUILD.bazel files for each command, then execute on these generated build files.

This allows us to enable the following:

  • Trim the dependency tree for each command.
    • Reduce the possibility of invalidating an output when an unrelated input file is touched
    • More parallelism within Bazel, not make
    • Even faster incremental builds
  • Generate compile_commands.json, which can then be plugged into IDEs and code search tools (e.g. https://cs.android.com/android/kernel/superproject)
  • More cache hits for Remote Build Execution (RBE)
  • Give a more trimmed and precise list of resources for DDK
  • etc.