On 2021-06-14 06:13, Jie Fu wrote:
On Mon, 14 Jun 2021 12:54:33 GMT, Erik Joelsson <[email protected]> wrote:
Hi all,
SVML lib shouldn't be generated when C2 is absent.
This is because it is only used by C2.
Thanks.
Best regards,
Jie
make/autoconf/jvm-features.m4 line 571:
569: ENABLE_CDS="true"
570: INCLUDE_JVMCI="true"
571: INCLUDE_COMPILER2="true"
I would recommend inverting this logic so that it works properly in the
(unlikely) even that two or more JVM variants are built into the same JDK. I
assume we want this library built if any JVM variant has c2.
Thanks @erikj79 for your review.
What do you mean by `two or more JVM variants are built into the same JDK` ?
Did you mean two different JVM variants can be built into just one JDK images?
Yes, there is still support for building multiple variants into the same
image even though this is not something we currently do for any Oracle
offering. But as long as the build supports it, we should try to keep it
working. In this case your new variable should be true if any variant
that is being built has the compiler2 feature. The current proposal will
skip building the library if any variant does not contain the compiler2
feature. If you initiate the variable to false and change it to true if
a variant has compiler2, we are set.
As you suggested, I used to try to use `$(call check-jvm-feature, compiler2)`
like this
diff --git a/make/modules/jdk.incubator.vector/Lib.gmk
b/make/modules/jdk.incubator.vector/Lib.gmk
index 2626065..a176b9a 100644
--- a/make/modules/jdk.incubator.vector/Lib.gmk
+++ b/make/modules/jdk.incubator.vector/Lib.gmk
@@ -27,7 +27,7 @@ include LibCommon.gmk
################################################################################
-ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64), true+true)
+ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64)+$(call
check-jvm-feature, compiler2), true+true+true)
$(eval $(call SetupJdkLibrary, BUILD_LIBSVML, \
NAME := svml, \
CFLAGS := $(CFLAGS_JDKLIB), \
But it doesn't work.
Am I missing something?
I deleted that comment because it was wrong. The check-jvm-feature macro
only works in the hotspot part of the build where the JVM_VARIANT
variable is set. Those makefiles are called for each JVM_VARIANT being
built.
/Erik