From 1afc688f196f5c75a7a373c33dadf8dafaaee000 Mon Sep 17 00:00:00 2001 From: iFarbod Date: Mon, 4 Nov 2024 01:50:07 +0330 Subject: [PATCH] Add RiscV64 support --- .../src/main/groovy/org/tboox/gradle/XMakePlugin.groovy | 6 +++--- .../src/main/resources/lua/install_artifacts.lua | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy index 75a8ee0..828052d 100644 --- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy +++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy @@ -38,13 +38,13 @@ class XMakePlugin implements Plugin { private XMakeTaskContext projectContext // the architecture maps - private Map archMaps = [Arm64: "arm64-v8a", Armv7: "armeabi-v7a", Arm: "armeabi", X64: "x86_64", X86: "x86"] + private Map archMaps = [Arm64: "arm64-v8a", Armv7: "armeabi-v7a", Arm: "armeabi", RiscV64: "riscv64", X64: "x86_64", X86: "x86"] // the forName maps - private Map forNameMaps = ["arm64-v8a": "Arm64", "armeabi-v7a": "Armv7", "armeabi": "Arm", "x86_64": "X64", "x86": "X86"] + private Map forNameMaps = ["arm64-v8a": "Arm64", "armeabi-v7a": "Armv7", "armeabi": "Arm", "riscv64": "RiscV64", "x86_64": "X64", "x86": "X86"] // the forName lists - private List forNames = ["Arm64", "Armv7", "Arm", "X64", "X86"] + private List forNames = ["Arm64", "Armv7", "Arm", "RiscV64", "X64", "X86"] @Override void apply(Project project) { diff --git a/gradle-xmake-plugin/src/main/resources/lua/install_artifacts.lua b/gradle-xmake-plugin/src/main/resources/lua/install_artifacts.lua index 54ba344..1b31c44 100644 --- a/gradle-xmake-plugin/src/main/resources/lua/install_artifacts.lua +++ b/gradle-xmake-plugin/src/main/resources/lua/install_artifacts.lua @@ -59,6 +59,7 @@ function _install_cxxstl_newer_ndk(opt) local toolchains_archs = { ["armeabi-v7a"] = "arm-linux-androideabi", ["arm64-v8a"] = "aarch64-linux-android", + ["riscv64"] = "riscv64-linux-android", ["x86"] = "i686-linux-android", ["x86_64"] = "x86_64-linux-android" } @@ -118,6 +119,7 @@ function _install_cxxstl(opt) , ["armeabi"] = "armeabi" -- removed in ndk r17 , ["armeabi-v7a"] = "armeabi-v7a" , ["arm64-v8a"] = "arm64-v8a" + , ["riscv64"] = "riscv64" , i386 = "x86" -- deprecated , x86 = "x86" , x86_64 = "x86_64"