Do not expand flags in invocation policy twice. `InvocationPolicyEnforcer` [expands all flags before setting](https://github.com/bazelbuild/bazel/blob/60fc2d18fadec5f99849b78bce761da62dd78c32/src/main/java/com/google/devtools/common/options/InvocationPolicyEnforcer.java#L124-L125) them to later call into the `OptionsParser` to set their values, which [repeats the process for the flags with expansions/implicit requirements](https://github.com/bazelbuild/bazel/blob/60fc2d18fadec5f99849b78bce761da62dd78c32/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java#L549-L556). Refactor `OptionsParser` to expose a method for setting flag value without the expansion so that `InvocationPolicyEnforcer` can skip the second, unnecessary expansion. PiperOrigin-RevId: 378775962
{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.
Follow our tutorials:
See CONTRIBUTING.md