diff options
author | 2017-10-17 17:40:45 +0200 | |
---|---|---|
committer | 2017-10-18 10:28:09 +0200 | |
commit | 87a5fa9d05dec29d92dd008a4f8fa725181b1d03 (patch) | |
tree | 03b0ed98c7f3931ff8c134f920d33d5634c3e60b /src/main | |
parent | 445a8798fd9ab9e0602f6792ec7e384a15dbdd79 (diff) |
Start process of making auto_cpu_environment_group non-experimental.
Adds a legacy flag so clients can continue to use both
experimental_auto_cpu_environment_group and auto_cpu_environment_group until
uses can be cleaned up.
PiperOrigin-RevId: 172470616
Diffstat (limited to 'src/main')
2 files changed, 19 insertions, 17 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index fd1fb453d9..ea51b3b4f6 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -935,12 +935,15 @@ public final class BuildConfiguration implements BuildEvent { public List<Label> targetEnvironments; @Option( - name = "experimental_auto_cpu_environment_group", + name = "auto_cpu_environment_group", + // TODO(b/67853005): Remove when all usage of experimental_auto_cpu_environment_group is + // removed + oldName = "experimental_auto_cpu_environment_group", converter = EmptyToNullLabelConverter.class, defaultValue = "", category = "flags", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = { OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.LOADING_AND_ANALYSIS }, + documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS, + effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.LOADING_AND_ANALYSIS}, metadataTags = {OptionMetadataTag.EXPERIMENTAL}, help = "Declare the environment_group to use for automatically mapping cpu values to " @@ -1699,7 +1702,7 @@ public final class BuildConfiguration implements BuildEvent { * client's own environment, and are returned by this function. * * <p>The values of the "variable" variables are tracked in Skyframe via the {@link - * com.google.devtools.build.lib.skyframe.SkyFunctions.CLIENT_ENVIRONMENT_VARIABLE} skyfunction. + * com.google.devtools.build.lib.skyframe.SkyFunctions#CLIENT_ENVIRONMENT_VARIABLE} skyfunction. * This method only returns the names of those variables to be inherited, if set in the client's * environment. (Variables where the name is not returned in this set should not be taken from the * client environment.) diff --git a/src/main/java/com/google/devtools/build/lib/analysis/constraints/TopLevelConstraintSemantics.java b/src/main/java/com/google/devtools/build/lib/analysis/constraints/TopLevelConstraintSemantics.java index 7e8cfd41cf..81ffb6e100 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/constraints/TopLevelConstraintSemantics.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/constraints/TopLevelConstraintSemantics.java @@ -49,29 +49,28 @@ import javax.annotation.Nullable; public class TopLevelConstraintSemantics { /** - * Checks that if this is an environment-restricted build, all top-level targets support - * expected top-level environments. Expected top-level environments can be declared explicitly - * through {@code --target_environment} or implicitly through - * {@code --experimental_auto_cpu_environment_group}. For the latter, top-level targets must - * be compatible with the build's target configuration CPU. + * Checks that if this is an environment-restricted build, all top-level targets support expected + * top-level environments. Expected top-level environments can be declared explicitly through + * {@code --target_environment} or implicitly through {@code --auto_cpu_environment_group}. For + * the latter, top-level targets must be compatible with the build's target configuration CPU. * - * <p>If any target doesn't support an explicitly expected environment declared through - * {@link BuildConfiguration.Options#targetEnvironments}, the entire build fails with an error. + * <p>If any target doesn't support an explicitly expected environment declared through {@link + * BuildConfiguration.Options#targetEnvironments}, the entire build fails with an error. * - * <p>If any target doesn't support an implicitly expected environment declared through - * {@link BuildConfiguration.Options#autoCpuEnvironmentGroup}, the target is skipped during - * execution while remaining targets execute as normal. + * <p>If any target doesn't support an implicitly expected environment declared through {@link + * BuildConfiguration.Options#autoCpuEnvironmentGroup}, the target is skipped during execution + * while remaining targets execute as normal. * * @param topLevelTargets the build's top-level targets * @param packageManager object for retrieving loaded targets * @param eventHandler the build's event handler - * * @return the set of bad top-level targets. * @throws ViewCreationFailedException if any target doesn't support an explicitly expected - * environment declared through {@link BuildConfiguration.Options#targetEnvironments} + * environment declared through {@link BuildConfiguration.Options#targetEnvironments} */ public static Set<ConfiguredTarget> checkTargetEnvironmentRestrictions( - Iterable<ConfiguredTarget> topLevelTargets, PackageManager packageManager, + Iterable<ConfiguredTarget> topLevelTargets, + PackageManager packageManager, ExtendedEventHandler eventHandler) throws ViewCreationFailedException, InterruptedException { ImmutableSet.Builder<ConfiguredTarget> badTargets = ImmutableSet.builder(); |