aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar cushon <cushon@google.com>2017-05-04 21:38:49 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-05-04 23:06:16 +0200
commit721b47cee9acc60b7468e1bd3eb2b62b75cd7d04 (patch)
tree26288dc31e074c148c60b71541a029975fb9ac5c /src/main/java/com
parent0c5ac0f64297481cf7706873912a6a5bc8e1deed (diff)
Fix turbine direct classpaths for targets with no deps
If the list of direct deps is empty, it's either because the action doesn't distinguish between direct and transitive deps, or because the target has no deps at all. The 'direct classpath optimization' can still be applied in the latter case. PiperOrigin-RevId: 155112465
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileAction.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileAction.java
index 32ffcdfce5..5e05cc6f50 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileAction.java
@@ -487,7 +487,7 @@ public class JavaHeaderCompileAction extends SpawnAction {
/** Returns true if the header compilation classpath should only include direct deps. */
boolean useDirectClasspath() {
- if (directJars.isEmpty()) {
+ if (directJars.isEmpty() && !classpathEntries.isEmpty()) {
// the compilation doesn't distinguish direct deps, e.g. because it doesn't support strict
// java deps
return false;