proper ISABELLE_PLATFORM_FAMILY within Isabelle/Scala, in contrast to historic settings;
authorwenzelm
Tue, 30 Jan 2024 21:20:19 +0100
changeset 79548 a33a6e541cbb
parent 79547 bcd5136c7f5c
child 79549 501af322319c
proper ISABELLE_PLATFORM_FAMILY within Isabelle/Scala, in contrast to historic settings;
src/Pure/System/isabelle_platform.scala
--- a/src/Pure/System/isabelle_platform.scala	Tue Jan 30 17:36:14 2024 +0100
+++ b/src/Pure/System/isabelle_platform.scala	Tue Jan 30 21:20:19 2024 +0100
@@ -39,7 +39,6 @@
     settings.collectFirst({ case (a, b) if a == name => b }).
       getOrElse(error("Bad platform settings variable: " + quote(name)))
 
-  val ISABELLE_PLATFORM_FAMILY: String = get("ISABELLE_PLATFORM_FAMILY")
   val ISABELLE_PLATFORM64: String = get("ISABELLE_PLATFORM64")
   val ISABELLE_WINDOWS_PLATFORM64: String = get("ISABELLE_WINDOWS_PLATFORM64")
   val ISABELLE_APPLE_PLATFORM64: String = get("ISABELLE_APPLE_PLATFORM64")
@@ -48,6 +47,11 @@
     ISABELLE_PLATFORM64.startsWith("arm64-") ||
     ISABELLE_APPLE_PLATFORM64.startsWith("arm64-")
 
+  val ISABELLE_PLATFORM_FAMILY: String = {
+    val family0 = get("ISABELLE_PLATFORM_FAMILY")
+    if (family0 == "linux" && is_arm) "linux_arm" else family0
+  }
+
   def is_linux: Boolean =
     ISABELLE_PLATFORM_FAMILY == "linux" ||
     ISABELLE_PLATFORM_FAMILY == "linux_arm"