From 5f45e82eb6c1982e91635f392e71071220bf84bb Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Thu, 26 Sep 2019 17:19:27 +0200 Subject: [PATCH] Bazel: Fix running tests with toolchain_vanilla Javabase option was accidentally omitted, but without that option the tests are failing with toolchain_vanilla. Also fix java_next config setting detection. In I721067202de toolchain vanilla was forked from @bazel_tools//tools/jdk:toolchain_vanilla to //tools:toolchain_vanilla to fix hard coding of target language level to Java 8 (byte code major version 52), but the detection of config setting was missed to be adapted. Change-Id: I827ce58ae28fc2479dae0654a9b202fa61875087 --- BUILD | 2 +- Documentation/dev-bazel.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BUILD b/BUILD index 22d441bfbd..c48b3b951e 100644 --- a/BUILD +++ b/BUILD @@ -13,7 +13,7 @@ config_setting( config_setting( name = "java_next", values = { - "java_toolchain": "@bazel_tools//tools/jdk:toolchain_vanilla", + "java_toolchain": "//tools:toolchain_vanilla", }, ) diff --git a/Documentation/dev-bazel.txt b/Documentation/dev-bazel.txt index 158e528e99..ecee622ad7 100644 --- a/Documentation/dev-bazel.txt +++ b/Documentation/dev-bazel.txt @@ -42,6 +42,7 @@ provide the path to JDK home: ``` $ bazel build \ --define=ABSOLUTE_JAVABASE= \ + --javabase=@bazel_tools//tools/jdk:absolute_javabase \ --host_javabase=@bazel_tools//tools/jdk:absolute_javabase \ --host_java_toolchain=//tools:toolchain_vanilla \ --java_toolchain=//tools:toolchain_vanilla \