aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-08-17 11:24:19 +0200
committerGravatar Irina Iancu <elenairina@google.com>2017-08-18 08:58:50 +0200
commit2b25a2a85a7b4d743eb3f38138bb350a19295077 (patch)
tree46a2276dcfef88b02deb8775248573896bd267b0 /src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
parentab38960b9f34b965352d953afc00b918a97966a3 (diff)
Fetch the Java-specific Make variables from the :host_jdk dependency instead of the configuration in genrules.
This is necessary because if one uses a java_runtime rule that has java_home="$(VAR") and VAR is set to an absolute path, BuildConfiguration won't be able to resolve VAR (since it's a Make variable and thus can't affect other Make variables), Blaze won't be able to tell that it's an absolute value and thus will prepend the package name of the java_runtime rule to it, e.g. resulting in a//foo/bar instead of /foo/bar if the java_runtime rule is in package a. RELNOTES: None. PiperOrigin-RevId: 165555251
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index 2274a3dfb9..eaa634d34b 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -1086,8 +1086,8 @@ public final class RuleContext extends TargetContext
if (!attributes().has(attributeName)) {
continue;
}
- Iterables.addAll(makeVariableProviders,
- getPrerequisites(attributeName, Mode.TARGET, MakeVariableProvider.SKYLARK_CONSTRUCTOR));
+ Iterables.addAll(makeVariableProviders, getPrerequisites(
+ attributeName, Mode.DONT_CHECK, MakeVariableProvider.SKYLARK_CONSTRUCTOR));
}
LinkedHashMap<String, String> makeVariables = new LinkedHashMap<>();