aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoogler <noreply@google.com>2024-05-16 08:43:24 -0700
committerCopybara-Service <copybara-worker@google.com>2024-05-16 08:43:58 -0700
commit1acf5213b6170f1f0133e273cb85ede0e732048f (patch)
tree3dec27a0f9a6043292dd3e76578bee3e7914aad5
parent71d9e52bdb292a9728ec8d18f46b33d596559e38 (diff)
downloadbazelbuild-rules_cc-upstream-main.tar.gz
Disable exec_transition_for_inputs in rule-based toolchainsupstream-main
BEGIN_PUBLIC Doing a transition to the exec platform in rule-based toolchains was causing unusual behaviors when attempting to restrict compatibility. This changes most of the toolchain rules to be evaluated from the target platform configuration, only transitioning to the exec configuration when explicitly requested. END_PUBLIC PiperOrigin-RevId: 634411095 Change-Id: I8716b9a517d9f3be306cdf96dafb98a868a3f83b
-rw-r--r--cc/toolchains/toolchain.bzl2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/toolchains/toolchain.bzl b/cc/toolchains/toolchain.bzl
index 0ce1abf..8ee15de 100644
--- a/cc/toolchains/toolchain.bzl
+++ b/cc/toolchains/toolchain.bzl
@@ -139,5 +139,7 @@ def cc_toolchain(
static_runtime_lib = static_runtime_lib,
supports_header_parsing = supports_header_parsing,
supports_param_files = supports_param_files,
+ # This is required for Bazel versions <= 7.x.x. It is ignored in later versions.
+ exec_transition_for_inputs = False,
**(all_kwargs | legacy_file_groups)
)