mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8310105: LoongArch64 builds are broken after JDK-8304913
Reviewed-by: shade, rriggs
This commit is contained in:
parent
33c6ec9d4e
commit
137a5f7c2c
3 changed files with 13 additions and 0 deletions
|
@ -39,6 +39,7 @@ public enum Architecture {
|
||||||
AARCH64,
|
AARCH64,
|
||||||
ARM,
|
ARM,
|
||||||
RISCV64,
|
RISCV64,
|
||||||
|
LOONGARCH64,
|
||||||
S390,
|
S390,
|
||||||
PPC64,
|
PPC64,
|
||||||
MIPSEL,
|
MIPSEL,
|
||||||
|
@ -71,6 +72,14 @@ public enum Architecture {
|
||||||
return PlatformProps.TARGET_ARCH_IS_RISCV64;
|
return PlatformProps.TARGET_ARCH_IS_RISCV64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@return {@code true} if the current architecture is LOONGARCH64}
|
||||||
|
*/
|
||||||
|
@ForceInline
|
||||||
|
public static boolean isLOONGARCH64() {
|
||||||
|
return PlatformProps.TARGET_ARCH_IS_LOONGARCH64;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@return {@code true} if the current architecture is S390}
|
* {@return {@code true} if the current architecture is S390}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -55,6 +55,7 @@ class PlatformProps {
|
||||||
static final boolean TARGET_ARCH_IS_AARCH64 = "@@OPENJDK_TARGET_CPU@@" == "aarch64";
|
static final boolean TARGET_ARCH_IS_AARCH64 = "@@OPENJDK_TARGET_CPU@@" == "aarch64";
|
||||||
static final boolean TARGET_ARCH_IS_ARM = "@@OPENJDK_TARGET_CPU@@" == "arm";
|
static final boolean TARGET_ARCH_IS_ARM = "@@OPENJDK_TARGET_CPU@@" == "arm";
|
||||||
static final boolean TARGET_ARCH_IS_RISCV64 = "@@OPENJDK_TARGET_CPU@@" == "riscv64";
|
static final boolean TARGET_ARCH_IS_RISCV64 = "@@OPENJDK_TARGET_CPU@@" == "riscv64";
|
||||||
|
static final boolean TARGET_ARCH_IS_LOONGARCH64 = "@@OPENJDK_TARGET_CPU@@" == "loongarch64";
|
||||||
static final boolean TARGET_ARCH_IS_S390 = "@@OPENJDK_TARGET_CPU@@" == "s390";
|
static final boolean TARGET_ARCH_IS_S390 = "@@OPENJDK_TARGET_CPU@@" == "s390";
|
||||||
static final boolean TARGET_ARCH_IS_PPC64 = "@@OPENJDK_TARGET_CPU@@" == "ppc64";
|
static final boolean TARGET_ARCH_IS_PPC64 = "@@OPENJDK_TARGET_CPU@@" == "ppc64";
|
||||||
static final boolean TARGET_ARCH_IS_MIPSEL = "@@OPENJDK_TARGET_CPU@@" == "mipsel";
|
static final boolean TARGET_ARCH_IS_MIPSEL = "@@OPENJDK_TARGET_CPU@@" == "mipsel";
|
||||||
|
|
|
@ -31,6 +31,7 @@ import static jdk.internal.util.Architecture.AARCH64;
|
||||||
import static jdk.internal.util.Architecture.ARM;
|
import static jdk.internal.util.Architecture.ARM;
|
||||||
import static jdk.internal.util.Architecture.PPC64;
|
import static jdk.internal.util.Architecture.PPC64;
|
||||||
import static jdk.internal.util.Architecture.RISCV64;
|
import static jdk.internal.util.Architecture.RISCV64;
|
||||||
|
import static jdk.internal.util.Architecture.LOONGARCH64;
|
||||||
import static jdk.internal.util.Architecture.S390;
|
import static jdk.internal.util.Architecture.S390;
|
||||||
import static jdk.internal.util.Architecture.X64;
|
import static jdk.internal.util.Architecture.X64;
|
||||||
import static jdk.internal.util.Architecture.X86;
|
import static jdk.internal.util.Architecture.X86;
|
||||||
|
@ -72,6 +73,7 @@ public class ArchTest {
|
||||||
case "aarch64" -> AARCH64;
|
case "aarch64" -> AARCH64;
|
||||||
case "arm" -> ARM;
|
case "arm" -> ARM;
|
||||||
case "riscv64" -> RISCV64;
|
case "riscv64" -> RISCV64;
|
||||||
|
case "loongarch64" -> LOONGARCH64;
|
||||||
case "s390x", "s390" -> S390;
|
case "s390x", "s390" -> S390;
|
||||||
case "ppc64", "ppc64le" -> PPC64;
|
case "ppc64", "ppc64le" -> PPC64;
|
||||||
case "mipsel" -> MIPSEL;
|
case "mipsel" -> MIPSEL;
|
||||||
|
@ -92,6 +94,7 @@ public class ArchTest {
|
||||||
Arguments.of(AARCH64, Architecture.isAARCH64()),
|
Arguments.of(AARCH64, Architecture.isAARCH64()),
|
||||||
Arguments.of(ARM, Architecture.isARM()),
|
Arguments.of(ARM, Architecture.isARM()),
|
||||||
Arguments.of(RISCV64, Architecture.isRISCV64()),
|
Arguments.of(RISCV64, Architecture.isRISCV64()),
|
||||||
|
Arguments.of(LOONGARCH64, Architecture.isLOONGARCH64()),
|
||||||
Arguments.of(S390, Architecture.isS390()),
|
Arguments.of(S390, Architecture.isS390()),
|
||||||
Arguments.of(MIPSEL, Architecture.isMIPSEL()),
|
Arguments.of(MIPSEL, Architecture.isMIPSEL()),
|
||||||
Arguments.of(MIPS64EL, Architecture.isMIPS64EL()),
|
Arguments.of(MIPS64EL, Architecture.isMIPS64EL()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue