diff options
author | John Cater <jcater@google.com> | 2018-01-19 08:23:46 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-19 08:25:45 -0800 |
commit | 8608df20d98873d1aecf2d6f08836d0b56f826fa (patch) | |
tree | e727343f9669d8aca4ad28bd5ea610e9ffabd687 /src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java | |
parent | 2b4584745a9830de25b8282d08751fbcb1c9972d (diff) |
Add new flag to add additional execution platforms.
Part of #4442.
Change-Id: Ie263be75b85635717aa5670cf059891e644dfaee
PiperOrigin-RevId: 182537464
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java index bb816a71a7..ff12670bda 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java @@ -39,6 +39,7 @@ public class PlatformConfiguration extends BuildConfiguration.Fragment { new PlatformConfiguration_AutoCodec(); private final Label executionPlatform; + private final ImmutableList<Label> extraExecutionPlatforms; private final ImmutableList<Label> targetPlatforms; private final ImmutableList<Label> extraToolchains; private final ImmutableMap<Label, Label> toolchainResolutionOverrides; @@ -47,11 +48,13 @@ public class PlatformConfiguration extends BuildConfiguration.Fragment { @AutoCodec.Constructor PlatformConfiguration( Label executionPlatform, + ImmutableList<Label> extraExecutionPlatforms, ImmutableList<Label> targetPlatforms, ImmutableList<Label> extraToolchains, ImmutableMap<Label, Label> toolchainResolutionOverrides, ImmutableList<Label> enabledToolchainTypes) { this.executionPlatform = executionPlatform; + this.extraExecutionPlatforms = extraExecutionPlatforms; this.targetPlatforms = targetPlatforms; this.extraToolchains = extraToolchains; this.toolchainResolutionOverrides = toolchainResolutionOverrides; @@ -67,6 +70,11 @@ public class PlatformConfiguration extends BuildConfiguration.Fragment { return executionPlatform; } + /** Additional platforms that are available for action execution. */ + public ImmutableList<Label> getExtraExecutionPlatforms() { + return extraExecutionPlatforms; + } + @SkylarkCallable(name = "platforms", structField = true, doc = "The current target platforms") public ImmutableList<Label> getTargetPlatforms() { return targetPlatforms; |