mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Instead of having rules depend on both native and Starlark versions of flags and reconciling them inside the rule implementation, this change moves the resolution logic into custom build setting flag targets (`compat_bool_flag` and `compat_string_list_flag`) defined in `third_party/protobuf/bazel/private/compat_flag.bzl`. Key details: - `compat_bool_flag`: Defines a string build setting flag target with a "default" sentinel value. When un-set on the command line, it falls back dynamically to reading native options on `ctx.fragments.proto` or default values, providing a boolean `BuildSettingInfo`. - `compat_string_list_flag`: Defines a string-list build setting flag target that reconciles explicit Starlark build settings with `ctx.fragments.proto` and default values. - Rules reference the flag targets directly (without separate helper `_compat` targets or `config_setting` rules). - Replaces `native_bool_flag.bzl` with `compat_flag.bzl`. PiperOrigin-RevId: 955468205 |
||
|---|---|---|
| .. | ||
| common | ||
| flags | ||
| private | ||
| tests | ||
| toolchains | ||
| BUILD | ||
| cc_proto_library.bzl | ||
| java_lite_proto_library.bzl | ||
| java_proto_library.bzl | ||
| proto_descriptor_set.bzl | ||
| proto_library.bzl | ||
| py_proto_library.bzl | ||
| upb_c_proto_library.bzl | ||
| upb_proto_reflection_library.bzl | ||