From 273b25f9fd71d24fd8ad1380c54802475a76a74c Mon Sep 17 00:00:00 2001 From: Pete Gillin Date: Thu, 2 May 2019 15:46:10 +0100 Subject: [PATCH] Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9. The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy from when the 8 -> 9 toolchain upgrade was happening. That migration is done and the variable only affects the language level, so it should have a name that reflects that. (The current situation would be especially confusing if we started a 9 -> 11 toolchain upgrade, presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11, since the two settings look incompatible but are actually orthogonal.) The current variable historically allowed a value or "1.8" which meant "use the OpenJDK 9 toolchain but target language level 8". That value no longer has any meaning and the new variable doesn't allow it. Bug: 131678633 Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true` Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53 Change-Id: Ic1f76a656bea30713b356a28e82f908a46933893 Test: Audit all mentions of the old string here and downstream --- core/config.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/config.mk b/core/config.mk index 94928a24ae..5f73c965c2 100644 --- a/core/config.mk +++ b/core/config.mk @@ -624,11 +624,9 @@ EXTRACT_KERNEL := build/make/tools/extract_kernel.py USE_OPENJDK9 := true -ifeq ($(EXPERIMENTAL_USE_OPENJDK9),) +ifeq ($(EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9),) TARGET_OPENJDK9 := -else ifeq ($(EXPERIMENTAL_USE_OPENJDK9),1.8) -TARGET_OPENJDK9 := -else ifeq ($(EXPERIMENTAL_USE_OPENJDK9),true) +else ifeq ($(EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9),true) TARGET_OPENJDK9 := true endif