From dbe1ed769d4c957d7b8aea2c9c92febfc26f022d Mon Sep 17 00:00:00 2001 From: cushon Date: Thu, 29 Mar 2018 09:57:36 -0700 Subject: Remove startup JVM version check This was added during the JDK 7->8 transition to improve the diagnostic when an older-than-supported host_javabase was used. The version number handling doesn't work with JDK 9 (see [1]), and using Bazel binaries with a bundled host_javabase avoid the error entirely so the message is less important. [1] http://openjdk.java.net/jeps/223 PiperOrigin-RevId: 190944476 --- src/BUILD | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/BUILD') diff --git a/src/BUILD b/src/BUILD index 50cdd5f477..96de690575 100644 --- a/src/BUILD +++ b/src/BUILD @@ -53,23 +53,6 @@ genquery( scope = ["//tools/defaults:java_toolchain"], ) -genrule( - name = "java-version", - srcs = [":java_toolchain_content"], - outs = ["java.version"], - cmd = """ - VERSION_LINE=$$(cat $< | grep target_version); - JAVA_VERSION=$$(echo $${VERSION_LINE} | sed 's/.*value=\\"\\([^\\"]\\)\\".*/\\1/'); - if [ -z "$${JAVA_VERSION}" ]; then - echo "1.8" >$@ # Java 8 is the default - elif [[ "$${JAVA_VERSION}" =~ ^[0-9]+$$ ]]; then - echo "1.$${JAVA_VERSION}" >$@ # Add 1. before 7 or 8 - else - echo "$${JAVA_VERSION}" >$@ - fi - """, -) - # Create dummy tools so we can do select to prevent building iOS target on # Linux. OSX_DUMMY_TARGETS = [ @@ -259,7 +242,6 @@ genrule( "//src/main/tools:jdk-support", "//src/main/tools:linux-sandbox", "//tools/osx:xcode-locator", - ":java-version", ], outs = ["package" + suffix + ".zip"], cmd = "$(location :package-bazel.sh) $@ " + ("" if embed else "''") + " $(SRCS)", -- cgit v1.2.3