diff options
author | 2018-01-15 09:08:04 -0800 | |
---|---|---|
committer | 2018-01-15 09:10:00 -0800 | |
commit | f2075d27ca124156fcd7c01242c552175c0cf145 (patch) | |
tree | 8759ed9a6d159cc5eecc093d0586a0d8d025b0de /src/main/java/com/google/devtools/build/lib/rules | |
parent | 1bf3e3685e124510a6a4874039a994ccf425e5ce (diff) |
Export the runfiles path of the JVM executable to Skylark.
RELNOTES: None.
PiperOrigin-RevId: 181973847
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntimeInfo.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntimeInfo.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntimeInfo.java index bb4e2a854c..8488968fa0 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntimeInfo.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntimeInfo.java @@ -81,6 +81,14 @@ public class JavaRuntimeInfo extends NativeInfo { return javaBinaryExecPath; } + @SkylarkCallable( + name = "java_executable_runfiles_path", + doc = "Returns the path of the Java executable in runfiles trees. This should only be used " + + "when one needs to access the JVM during the execution of a binary or a test built " + + "by Bazel. In particular, when one needs to invoke the JVM during an action, " + + "java_executable_exec_path should be used instead.", + structField = true + ) /** The runfiles path of the Java binary. */ public PathFragment javaBinaryRunfilesPath() { return javaBinaryRunfilesPath; |