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-17 14:04:57 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-02-17 14:04:57 +0000
commit8e0a53b0c2c94e8b28d1f91d5879b7a30794ceb1 (patch)
tree8646885f64d8e4cb8bce7fe3cbd9c2d13218eec9 /src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactContext.java
parentc1f894e6e9d9aa3044dbe25034270e256c76c4ad (diff)
Make it possible for a Blaze command not to build the filesToRun of a configured target mentioned on the command line.
Note that this exacerbates the mess in TopLevelArtifactHelper even more. Next step will be to eliminate --compile_only / --compilation_prerequisites_only / --build_default_artifacts in favor of --output_groups. However, that's quite an intrusive change and I'd rather submit that as a separate CL. -- MOS_MIGRATED_REVID=86487224
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.java13
1 files changed, 10 insertions, 3 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 c9b8e51539..6f8c6dba95 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
@@ -28,22 +28,24 @@ public final class TopLevelArtifactContext {
public static final TopLevelArtifactContext DEFAULT = new TopLevelArtifactContext(
"", /*compileOnly=*/false, /*compilationPrerequisitesOnly*/false,
- /*runTestsExclusively=*/false, /*outputGroups=*/ImmutableSet.<String>of(),
- /*shouldRunTests=*/false);
+ /*buildDefaultArtifacts=*/true, /*runTestsExclusively=*/false,
+ /*outputGroups=*/ImmutableSet.<String>of(), /*shouldRunTests=*/false);
private final String buildCommand;
private final boolean compileOnly;
private final boolean compilationPrerequisitesOnly;
+ private final boolean filesToRun;
private final boolean runTestsExclusively;
private final ImmutableSet<String> outputGroups;
private final boolean shouldRunTests;
public TopLevelArtifactContext(String buildCommand, boolean compileOnly,
- boolean compilationPrerequisitesOnly, boolean runTestsExclusively,
+ boolean compilationPrerequisitesOnly, boolean filesToRun, boolean runTestsExclusively,
ImmutableSet<String> outputGroups, boolean shouldRunTests) {
this.buildCommand = buildCommand;
this.compileOnly = compileOnly;
this.compilationPrerequisitesOnly = compilationPrerequisitesOnly;
+ this.filesToRun = filesToRun;
this.runTestsExclusively = runTestsExclusively;
this.outputGroups = outputGroups;
this.shouldRunTests = shouldRunTests;
@@ -64,6 +66,11 @@ public final class TopLevelArtifactContext {
return compilationPrerequisitesOnly;
}
+ /** Returns the value of the (undocumented) --build_default_artifacts flag. */
+ public boolean buildDefaultArtifacts() {
+ return filesToRun;
+ }
+
/** Whether to run tests in exclusive mode. */
public boolean runTestsExclusively() {
return runTestsExclusively;