mirror of https://github.com/apache/lucene.git
disable vectors (and don't warn to add incubator module) for jvmci/graal (#12766)
This commit is contained in:
parent
0e9c23785e
commit
eab3e502bb
|
@ -117,6 +117,12 @@ public abstract class VectorizationProvider {
|
|||
"Java runtime is not using Hotspot VM; Java vector incubator API can't be enabled.");
|
||||
return new DefaultVectorizationProvider();
|
||||
}
|
||||
// don't use vector module with JVMCI (it does not work)
|
||||
if (Constants.IS_JVMCI_VM) {
|
||||
LOG.warning(
|
||||
"Java runtime is using JVMCI Compiler; Java vector incubator API can't be enabled.");
|
||||
return new DefaultVectorizationProvider();
|
||||
}
|
||||
// is the incubator module present and readable (JVM providers may to exclude them or it is
|
||||
// build with jlink)
|
||||
final var vectorMod = lookupVectorModule();
|
||||
|
|
|
@ -66,6 +66,10 @@ public final class Constants {
|
|||
/** True iff the Java VM is based on Hotspot and has the Hotspot MX bean readable by Lucene. */
|
||||
public static final boolean IS_HOTSPOT_VM = HotspotVMOptions.IS_HOTSPOT_VM;
|
||||
|
||||
/** True if jvmci is enabled (e.g. graalvm) */
|
||||
public static final boolean IS_JVMCI_VM =
|
||||
HotspotVMOptions.get("UseJVMCICompiler").map(Boolean::valueOf).orElse(false);
|
||||
|
||||
/** True iff running on a 64bit JVM */
|
||||
public static final boolean JRE_IS_64BIT = is64Bit();
|
||||
|
||||
|
|
Loading…
Reference in New Issue