diff options
| author | iFarbod <[email protected]> | 2024-10-30 22:35:40 +0330 |
|---|---|---|
| committer | iFarbod <[email protected]> | 2024-10-30 22:35:40 +0330 |
| commit | 8e8f6f6cfbf3f00ba86f977947f7d38c250f5c11 (patch) | |
| tree | 86827f85ab5f6f89f8b2ab1f78f12a0ee04fde48 /xmake/modules | |
| parent | d58c9bcd0475d513da4dfb5e17a71ec1644529a7 (diff) | |
Add riscv64 support for Android NDK projects
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/detect/sdks/find_ndk.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_ndk.lua b/xmake/modules/detect/sdks/find_ndk.lua index 41e8088cc..2523eeb5e 100644 --- a/xmake/modules/detect/sdks/find_ndk.lua +++ b/xmake/modules/detect/sdks/find_ndk.lua @@ -34,6 +34,7 @@ function _get_triple(arch) , ["armeabi"] = "arm-linux-androideabi" -- removed in ndk r17 , ["armeabi-v7a"] = "arm-linux-androideabi" , ["arm64-v8a"] = "aarch64-linux-android" + , ["riscv64"] = "riscv64-linux-android" , i386 = "i686-linux-android" -- deprecated , x86 = "i686-linux-android" , x86_64 = "x86_64-linux-android" @@ -90,8 +91,8 @@ function _find_ndk_sdkver(sdkdir, bindir, sysroot, arch) -- try to select the best compatible version local sdkver = "16" - if use_llvm or arch == "arm64-v8a" then - sdkver = "21" + if use_llvm or arch == "arm64-v8a" or arch == "riscv64" then + sdkver = (arch == "riscv64") and "35" or "21" end if sysroot then if os.isdir(path.join(sysroot, "usr", "lib", triple, sdkver)) then @@ -170,6 +171,7 @@ function _find_ndk(sdkdir, arch, ndk_sdkver, ndk_toolchains_ver) , ["armeabi"] = "arm-linux-androideabi-" -- removed in ndk r17 , ["armeabi-v7a"] = "arm-linux-androideabi-" , ["arm64-v8a"] = "aarch64-linux-android-" + , ["riscv64"] = "riscv64-linux-android-" , i386 = "i686-linux-android-" -- deprecated , x86 = "i686-linux-android-" , x86_64 = "x86_64-linux-android-" @@ -186,6 +188,7 @@ function _find_ndk(sdkdir, arch, ndk_sdkver, ndk_toolchains_ver) , ["armeabi"] = "arm-linux-androideabi-*" , ["armeabi-v7a"] = "arm-linux-androideabi-*" , ["arm64-v8a"] = "aarch64-linux-android-*" + , ["riscv64"] = "riscv64-linux-android-*" , i386 = "x86-*" , x86 = "x86-*" , x86_64 = "x86_64-*" |
