fix: enable auto exec groups using attribute (#1986) This allows the precompile action to resolve its tools separately from other toolchains, allowing toolchain types with otherwise incompatible `exec_compatible_with` definitions to be used together.
diff --git a/CHANGELOG.md b/CHANGELOG.md index af8394b..c978cd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -31,6 +31,9 @@ ### Fixed * (bzlmod): Targets in `all_requirements` now use the same form as targets returned by the `requirement` macro. +* (rules) Auto exec groups are enabled. This allows actions run by the rules, + such as precompiling, to pick an execution platform separately from what + other toolchains support. ### Removed * Nothing yet
diff --git a/python/private/common/attributes.bzl b/python/private/common/attributes.bzl index eb4108f..503578b 100644 --- a/python/private/common/attributes.bzl +++ b/python/private/common/attributes.bzl
@@ -361,6 +361,9 @@ default = "//python/config_settings:precompile_source_retention", providers = [BuildSettingInfo], ), + # Force enabling auto exec groups, see + # https://bazel.build/extending/auto-exec-groups#how-enable-particular-rule + "_use_auto_exec_groups": attr.bool(default = True), }, allow_none = True, )