aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2015-02-25 10:38:04 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-02-25 10:38:04 +0000
commit97f47bac293a6791e83b94002cfaab719ee426d7 (patch)
treeef165946aa3efc32361d77bdfef7038467fa8c2c /src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java
parentb9e5130b8dedff033ec0e8eb2fe68ce11b765aa3 (diff)
Move all logic to determine which output groups are to be built to BuildRequest.determineOutputGroups().
This paves the way for making --compile_only, --compilation_prerequsites_only and --save_temps into aliases for --output_groups=<something> -- MOS_MIGRATED_REVID=87138659
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java b/src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java
index f6473d7c2e..f2ce36240d 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java
@@ -14,7 +14,7 @@
package com.google.devtools.build.lib.analysis;
-import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.ImmutableSortedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import java.util.Objects;
@@ -27,25 +27,18 @@ import java.util.Set;
public final class TopLevelArtifactContext {
public static final TopLevelArtifactContext DEFAULT = new TopLevelArtifactContext(
- /*buildDefaultArtifacts=*/true, /*runTestsExclusively=*/false,
- /*outputGroups=*/ImmutableSet.<String>of());
+ /*runTestsExclusively=*/false,
+ /*outputGroups=*/ImmutableSortedSet.<String>of());
- private final boolean buildDefaultArtifacts;
private final boolean runTestsExclusively;
- private final ImmutableSet<String> outputGroups;
+ private final ImmutableSortedSet<String> outputGroups;
- public TopLevelArtifactContext(boolean filesToRun,
- boolean runTestsExclusively, ImmutableSet<String> outputGroups) {
- this.buildDefaultArtifacts = filesToRun;
+ public TopLevelArtifactContext(boolean runTestsExclusively,
+ ImmutableSortedSet<String> outputGroups) {
this.runTestsExclusively = runTestsExclusively;
this.outputGroups = outputGroups;
}
- /** Returns the value of the (undocumented) --build_default_artifacts flag. */
- public boolean buildDefaultArtifacts() {
- return buildDefaultArtifacts;
- }
-
/** Whether to run tests in exclusive mode. */
public boolean runTestsExclusively() {
return runTestsExclusively;
@@ -62,8 +55,7 @@ public final class TopLevelArtifactContext {
public boolean equals(Object other) {
if (other instanceof TopLevelArtifactContext) {
TopLevelArtifactContext otherContext = (TopLevelArtifactContext) other;
- return buildDefaultArtifacts == otherContext.buildDefaultArtifacts
- && runTestsExclusively == otherContext.runTestsExclusively
+ return runTestsExclusively == otherContext.runTestsExclusively
&& outputGroups.equals(otherContext.outputGroups);
} else {
return false;
@@ -72,6 +64,6 @@ public final class TopLevelArtifactContext {
@Override
public int hashCode() {
- return Objects.hash(buildDefaultArtifacts, runTestsExclusively, outputGroups);
+ return Objects.hash(runTestsExclusively, outputGroups);
}
}