From 6e5b7243f44c7289c510c2818e4e99bec2c4a3d4 Mon Sep 17 00:00:00 2001 From: David Queneau <748280+toad-dev@users.noreply.github.com> Date: Sat, 17 Dec 2022 13:52:36 -0800 Subject: [PATCH] Deliver x86_64 Illuaminate binaries to all Macs The Intel native binaries run just fine on Apple-silicon Macs through Rosetta. --- buildSrc/src/main/kotlin/cc/tweaked/gradle/Illuaminate.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/cc/tweaked/gradle/Illuaminate.kt b/buildSrc/src/main/kotlin/cc/tweaked/gradle/Illuaminate.kt index 5ccc701a7..2336583c2 100644 --- a/buildSrc/src/main/kotlin/cc/tweaked/gradle/Illuaminate.kt +++ b/buildSrc/src/main/kotlin/cc/tweaked/gradle/Illuaminate.kt @@ -66,9 +66,11 @@ class IlluaminatePlugin : Plugin { val osArch = System.getProperty("os.arch").toLowerCase() val arch = when { + // On macOS the x86_64 binary will work for both ARM and Intel Macs through Rosetta. + os == "macos" -> "x86_64" osArch == "arm" || osArch.startsWith("aarch") -> error("Unsupported architecture '$osArch' for illuaminate") osArch.contains("64") -> "x86_64" - else -> error("Unsupported architecture $osArch for illuaminate") + else -> error("Unsupported architecture '$osArch' for illuaminate") } return project.dependencies.create(