diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2016-12-21 18:29:04 +0100 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-12-21 18:29:04 +0100 |
commit | f1ce35f4691fa5cd8849bf8944d1a4bdd2393690 (patch) | |
tree | 8687d77030d82048b53612e0bce816555dd46dd2 /third_party/java/jdk/README.md | |
parent | b649428620711c12ba18f7f1477d36742f267a31 (diff) |
Revert commit 6d31cb01b80d0560c0c083d40e641816877b3d06.
Commit 6d31cb was an internal reorganization of google repository
that should have resulted in no change. Due to a bug in our export
process it deleted several files in third_party.
Diffstat (limited to 'third_party/java/jdk/README.md')
-rw-r--r-- | third_party/java/jdk/README.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/third_party/java/jdk/README.md b/third_party/java/jdk/README.md new file mode 100644 index 0000000000..96881e66b8 --- /dev/null +++ b/third_party/java/jdk/README.md @@ -0,0 +1,23 @@ +# Java compilers in Bazel + +Bazel compiles Java code using a custom builder. This builder is called +JavaBuilder and its code lies in //src/java_tools/buildjar. To build Java +code, JavaBuilder use the Java compiler from the JDK. To support +[ErrorProne](http://errorprone.info) checks, we vendor a custom build +of the Java compiler code. This is the raw version of the Java compiler +from [OpenJDK](https://openjdk.java.net) but compiled for a lower +version of the JRE. Those builds are vendored in +//third_party/java/jdk/langtools. + +Currently Bazel supports running on a JRE 8 only because the default Java +compiler used (//third_party/java/jdk/langtools/javac-9-dev-r3297-1.jar) is the +Java compiler of OpenJDK 9 compiled to run on a JRE 8. This cannot +be built to run on a JRE 7 because of code incompatibility. Bazel's +JavaBuilder at HEAD cannot be linked with earlier version of the +Java compiler (it depends on some internals of the Java compiler). + +To build a version of Bazel that can run on a JRE 7, we need to rely +on the version of JavaBuilder provided with Bazel 0.1.0 +(//third_party/java/jdk/javabuilder/JavaBuilder_0.1.0_deploy.jar) which works +with a Java compiler of OpenJDK 8 compiled to run on a JRE 7 +(//third_party/java/jdk/langtools/javac7.jar). |