toolchain_vanilla: Unset source and target language level versions

Closes #9415.

The main feature of toolchain_vanilla definition is to support newer
Java language versions that the embedded JDK, e.g.: at the time of this
CL, toolchain_java could be used to support building with JDK 13 and
produce byte code major version 57, using the combination of absolute
javabase and toolchain_vanilla:

  $ bazel build --define=ABSOLUTE_JAVABASE=/use/local/bin/jdk-13 \
    --javabase=@bazel_tools//tools/jdk:absolute_javabase \
    --host_javabase=@bazel_tools//tools/jdk:absolute_javabase \
    --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
    --java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \
    :gerrit

Unfortunately, 6ef6d879ab69225d54ecab3db847fb4eff33bbeb sets source and
target language levels to Java 8 to restore backwards compatibility,
to fix a regression, that was introduced during bump of remote JDK
version to Java 11, in bad5a2beb9f8441d97b88d5c4323055e710f72e8.

This change restores the neutrality of toolchain_vanilla declaration by
unsetting source and target language level versions. So that the bazel
invocation in the example above produces byte code major version 57
(Java 13), and not 52 (Java 8) as it is the case before this change.

Change-Id: I1f471c987487b81bc149d1ad4368eee149004d79

Closes #9416.

Change-Id: I1f471c987487b81bc149d1ad4368eee149004d79
PiperOrigin-RevId: 271342117
1 file changed
tree: 73ee86ff398a98e754670953c68fb456d19e79a5
  1. .bazelci/
  2. examples/
  3. scripts/
  4. site/
  5. src/
  6. third_party/
  7. tools/
  8. .bazelrc
  9. .gitattributes
  10. .gitignore
  11. AUTHORS
  12. BUILD
  13. CHANGELOG.md
  14. CODEOWNERS
  15. combine_distfiles.py
  16. combine_distfiles_to_tar.sh
  17. compile.sh
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. distdir.bzl
  21. ISSUE_TEMPLATE.md
  22. LICENSE
  23. README.md
  24. WORKSPACE
README.md

Bazel

{Fast, Correct} - Choose two

Build and test software of any size, quickly and reliably.

  • Speed up your builds and tests: Bazel only rebuilds what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.

  • One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.

  • Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.

  • Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.

Getting Started

Documentation

Contributing to Bazel

See CONTRIBUTING.md

Build status

Bazel is released in ‘Beta’. See the product roadmap to learn about the path toward a stable 1.0 release.