--- a/src/Pure/Admin/build_polyml.scala Tue May 11 12:21:39 2021 +0200
+++ b/src/Pure/Admin/build_polyml.scala Tue May 11 13:06:36 2021 +0200
@@ -48,12 +48,9 @@
error("Bad Poly/ML root directory: " + root)
val platform = Isabelle_Platform.self
- val platform_arch =
- if (arch_64) platform.arch_64
- else if (platform.is_intel) "x86_64_32"
- else platform.arch_32
- val polyml_platform = platform_arch + "-" + platform.os_name
+ val polyml_platform =
+ (if (arch_64) platform.arch_64 else platform.arch_64_32) + "-" + platform.os_name
val sha1_platform = platform.arch_64 + "-" + platform.os_name
val info =
@@ -204,7 +201,7 @@
Isabelle_Tool("build_polyml", "build Poly/ML from sources", Scala_Project.here, args =>
{
var mingw = MinGW.none
- var arch_64 = Isabelle_Platform.self.is_arm
+ var arch_64 = false
var sha1_root: Option[Path] = None
val getopts = Getopts("""
--- a/src/Pure/System/isabelle_platform.scala Tue May 11 12:21:39 2021 +0200
+++ b/src/Pure/System/isabelle_platform.scala Tue May 11 13:06:36 2021 +0200
@@ -15,7 +15,8 @@
"ISABELLE_PLATFORM32",
"ISABELLE_PLATFORM64",
"ISABELLE_WINDOWS_PLATFORM32",
- "ISABELLE_WINDOWS_PLATFORM64")
+ "ISABELLE_WINDOWS_PLATFORM64",
+ "ISABELLE_APPLE_PLATFORM64")
def apply(ssh: Option[SSH.Session] = None): Isabelle_Platform =
{
@@ -46,25 +47,21 @@
getOrElse(error("Bad platform settings variable: " + quote(name)))
val ISABELLE_PLATFORM_FAMILY: String = get("ISABELLE_PLATFORM_FAMILY")
- val ISABELLE_PLATFORM32: String = get("ISABELLE_PLATFORM32")
val ISABELLE_PLATFORM64: String = get("ISABELLE_PLATFORM64")
- val ISABELLE_WINDOWS_PLATFORM32: String = get("ISABELLE_WINDOWS_PLATFORM32")
val ISABELLE_WINDOWS_PLATFORM64: String = get("ISABELLE_WINDOWS_PLATFORM64")
-
- def is_intel: Boolean =
- ISABELLE_PLATFORM32.startsWith("x86-") ||
- ISABELLE_PLATFORM64.startsWith("x86_64-")
+ val ISABELLE_APPLE_PLATFORM64: String = get("ISABELLE_APPLE_PLATFORM64")
def is_arm: Boolean =
- ISABELLE_PLATFORM32.startsWith("arm32-") ||
- ISABELLE_PLATFORM64.startsWith("arm64-")
+ ISABELLE_PLATFORM64.startsWith("arm64-") ||
+ ISABELLE_APPLE_PLATFORM64.startsWith("arm64-")
def is_linux: Boolean = ISABELLE_PLATFORM_FAMILY == "linux"
def is_macos: Boolean = ISABELLE_PLATFORM_FAMILY == "macos"
def is_windows: Boolean = ISABELLE_PLATFORM_FAMILY == "windows"
- def arch_32: String = if (is_arm) "arm32" else "x86"
def arch_64: String = if (is_arm) "arm64" else "x86_64"
+ def arch_64_32: String = if (is_arm) "arm64_32" else "x86_64_32"
+
def os_name: String = if (is_macos) "darwin" else ISABELLE_PLATFORM_FAMILY
override def toString: String = ISABELLE_PLATFORM_FAMILY