cquery --show_config_fragments: support user-defined options.

Given:

 $ blaze cquery 'deps(//:mytarget)' --show_config_fragments=[direct|transitive]

This includes as direct requirements:

? Starlark flags used in a rule's select()
? Starlark flags required by a Starlark rule's .bzl definition
? Android feature flags used in a rule's select()
? Android feature flags set by an android_binary
? Starlark rules providing FeatureFlagInfo (https://docs.bazel.build/versions/master/skylark/lib/FeatureFlagInfo.html)

This last case is a bit unusual: Starlark rules providing FeatureFlagInfo
"look like" configuration (since you can select() on them). But they aren't
actually configuration (since you can't set their values). See the discussion
on the last test in configured_query_test.sh for how we're handling them.

This also propagates required fragments through output files (e.g. when a rule
depends on "foo.out" which is a generated output depending on other rules).

PiperOrigin-RevId: 277348895
9 files changed
tree: 809a51994d6f96b6e9cd905de6a74bc3fb0b3c35
  1. .bazelci/
  2. examples/
  3. scripts/
  4. site/
  5. src/
  6. third_party/
  7. tools/
  8. .bazelrc
  9. .gitattributes
  10. .gitignore
  11. AUTHORS
  12. BUILD
  13. CHANGELOG.md
  14. CODEOWNERS
  15. combine_distfiles.py
  16. combine_distfiles_to_tar.sh
  17. compile.sh
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. distdir.bzl
  21. ISSUE_TEMPLATE.md
  22. LICENSE
  23. README.md
  24. WORKSPACE
README.md

Bazel

{Fast, Correct} - Choose two

Build and test software of any size, quickly and reliably.

  • Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.

  • One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.

  • Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.

  • Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.

Getting Started

Documentation

Contributing to Bazel

See CONTRIBUTING.md

Build status