diff --git a/site/en/docs/user-manual.md b/site/en/docs/user-manual.md index 7a567bc2f31f41..75aa2d974f8d99 100644 --- a/site/en/docs/user-manual.md +++ b/site/en/docs/user-manual.md @@ -1326,6 +1326,8 @@ The platforms that are available as execution platforms to run actions. Platforms can be specified by exact target, or as a target pattern. These platforms will be considered before those declared in the WORKSPACE file by [register_execution_platforms()](/rules/lib/globals#register_execution_platforms). +This option accepts a comma-separated list of platforms in order of priority. +If the flag is passed multiple times, the most recent overrides. #### `--extra_toolchains={{ "" }}labels{{ "" }}` {:#extra-toolchains} diff --git a/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java index a217fc85bf4bf3..6d1c021fa8e15c 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java @@ -76,15 +76,15 @@ public static boolean platformIsDefault(Label platform) { @Option( name = "extra_execution_platforms", converter = CommaSeparatedOptionListConverter.class, - defaultValue = "null", + defaultValue = "", documentationCategory = OptionDocumentationCategory.TOOLCHAIN, - allowMultiple = true, effectTags = {OptionEffectTag.EXECUTION}, help = "The platforms that are available as execution platforms to run actions. " + "Platforms can be specified by exact target, or as a target pattern. " + "These platforms will be considered before those declared in the WORKSPACE file by " - + "register_execution_platforms().") + + "register_execution_platforms(). This option may only be set once; later " + + "instances will override earlier flag settings.") public List extraExecutionPlatforms; @Option(