Break EXPERIMENTAL_USE_OPENJDK9 into {USE,TARGET}_OPENJDK9.
This CL topic breaks the single flag value EXPERIMENTAL_USE_OPENJDK9
into two flags USE_OPENJDK9 and TARGET_OPENJDK9 which are computed
independently in config.mk and config.go; this means that later
build logic no longer depends on / duplicates the semantics of an
unset EXPERIMENTAL_USE_OPENJDK9, because that later build logic
can use USE_OPENJDK9 and TARGET_OPENJDK9 instead. Thus, it becomes
slightly easier to change this default in future CLs (touching
only config.mk and config.go).
It also makes it more straightforward to convert .mk files
to .bp.
This CL also introduces a new allowed value "false" for
EXPERIMENTAL_USE_OPENJDK9. This fourth possible value currently
has the same semantics as a default/unset
EXPERIMENTAL_USE_OPENJDK9, but allows people to explicitly
switch back to the old semantics when the default changes.
Test: make showcommands core-oj (in environments with
EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295
Change-Id: Iaade9610b237722e5d175143808b8653b1e98996
diff --git a/core/java.mk b/core/java.mk
index 09e5371..7fa1447 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -555,7 +555,7 @@
$(eval $(call copy-one-file,$(full_classes_jarjar_jar),$(full_classes_jar)))
-ifeq ($(EXPERIMENTAL_USE_OPENJDK9),true)
+ifdef TARGET_OPENJDK9
LOCAL_DX_FLAGS := $(filter-out --multi-dex,$(LOCAL_DX_FLAGS)) --multi-dex
endif