From 75247e4de22ca5213c5012687975f0ccb25f205e Mon Sep 17 00:00:00 2001 From: Fabrice Drouin Date: Thu, 28 Mar 2024 14:23:05 +0100 Subject: [PATCH] Do not add linux target on aarch64 architectures (#25) It would fail as there is no kotlin-native toolchain yet and prevent us from building JVM targets. --- build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index e502d22..74db94c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -88,7 +88,11 @@ kotlin { } val currentOs = org.gradle.internal.os.OperatingSystem.current() - if (currentOs.isLinux) { + val arch = System.getProperty("os.arch") + + if (currentOs.isLinux && arch != "aarch64") { + // there is no kotlin native toolchain for linux arm64 yet, but we can still build for the JVM + // see https://youtrack.jetbrains.com/issue/KT-51794/Cant-run-JVM-targets-on-ARM-Linux-when-using-Kotlin-Multiplatform-plugin linuxX64 { phoenixBinaries() }