From ee45c6610ae213c12d57bf9e8e5ff674d7a9d7fc Mon Sep 17 00:00:00 2001 From: John Cater Date: Tue, 5 Jun 2018 11:09:01 -0700 Subject: Allow rules and targets to specify extra execution platform constraints. RuleClass.Builder now allows authors to specify whether a rule's targets can add additional constraints on the execution platform, and to declare additional constraints for all targets of that rule. Targets which support this now have an attribute, "exec_compatible_with", which supports specifying additional constraints that the execution platform used must match. This attribute is non-configurable. It will only affect execution platforms used during toolchain resolution. Part of #5217. Change-Id: Id2400dbf869a00aa2be3e3d2f085c2850cd6dc00 Closes #5227. Change-Id: If7d55f08f7f44bc7d7f6dfec86a3e6bcd68574b9 PiperOrigin-RevId: 199326255 --- .../com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java') diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index 906924fa9f..6cf2bd5d77 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -968,7 +968,11 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { SkyFunctionEnvironmentForTesting env = new SkyFunctionEnvironmentForTesting(buildDriver, eventHandler, this); return ToolchainUtil.createToolchainContext( - env, "", requiredToolchains, config == null ? null : BuildConfigurationValue.key(config)); + env, + "", + requiredToolchains, + /* execConstraintLabels= */ ImmutableSet.of(), + config == null ? null : BuildConfigurationValue.key(config)); } /** -- cgit v1.2.3