Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cquery --show_config_fragments: report --define requirements more pre…
…cisely. Before this change, any reliance on --define a=foo reports a dependency on the "CoreOptions" fragment. While true, that's too broad: it includes *all* --defines, including ones having nothing to do with "a". This change reports --define like user-defined flags (which it essentially is a special-case version of): return the specific --define instead. In the above example that'd be --define:a (using a syntax that's easy enough to read while being reasonably parseable as a no-spaces token). This only works for select(). It doesn't include MAKE variables, e.g.: https://github.com/bazelbuild/bazel/blob/6bd6cc4435e722393127c72189dbb646149d844b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java#L610-L621. That requires its own analysis. Prereq work for #10613. PiperOrigin-RevId: 292350812
- Loading branch information