From 760a60ac877c227189de54c71f3222889cc32479 Mon Sep 17 00:00:00 2001 From: Babneet Singh Date: Wed, 25 May 2022 11:44:58 -0700 Subject: [PATCH] Allow GENSRC_VARHANDLES with OpenJDK MethodHandles GENSRC_VARHANDLES converts X-VarHandle*.template files into Java files. X-VarHandle*.template files are located in the java.lang.invoke package directory. These are needed to support OpenJDK MethodHandles. Related: https://github.com/eclipse/openj9/issues/7352 Back-porting: https://github.com/ibmruntimes/openj9-openjdk-jdk14/pull/6 Signed-off-by: Babneet Singh --- closed/custom/gensrc/GensrcVarHandles-post.gmk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/closed/custom/gensrc/GensrcVarHandles-post.gmk b/closed/custom/gensrc/GensrcVarHandles-post.gmk index 0c5b51705ce..109b4b44d08 100644 --- a/closed/custom/gensrc/GensrcVarHandles-post.gmk +++ b/closed/custom/gensrc/GensrcVarHandles-post.gmk @@ -1,5 +1,5 @@ # =========================================================================== -# (c) Copyright IBM Corp. 2018, 2020 All Rights Reserved +# (c) Copyright IBM Corp. 2018, 2022 All Rights Reserved # =========================================================================== # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as @@ -18,5 +18,7 @@ # 2 along with this work; if not, see . # =========================================================================== -# OpenJ9 uses it's own VarHandles implementation -GENSRC_JAVA_BASE := $(filter-out $(GENSRC_VARHANDLES),$(GENSRC_JAVA_BASE)) +ifneq (true,$(OPENJ9_ENABLE_OPENJDK_METHODHANDLES)) + # OpenJ9 uses it's own VarHandles implementation + GENSRC_JAVA_BASE := $(filter-out $(GENSRC_VARHANDLES),$(GENSRC_JAVA_BASE)) +endif # OPENJ9_ENABLE_OPENJDK_METHODHANDLES