diff options
| author | A2va <[email protected]> | 2024-09-03 17:53:33 +0200 |
|---|---|---|
| committer | A2va <[email protected]> | 2024-09-03 17:53:33 +0200 |
| commit | 2a1bdf5e6fe01ed901eaa7d17528fc4a85daa7ad (patch) | |
| tree | c05c022e72441bf563c00fd3e837b47aba36bd05 | |
| parent | 61f7ab42feaabd5bca4f38a47f218203d19b3a6c (diff) | |
Fix version comp
| -rw-r--r-- | xmake/toolchains/ndk/load.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/toolchains/ndk/load.lua b/xmake/toolchains/ndk/load.lua index 913e89d02..bf72eaa87 100644 --- a/xmake/toolchains/ndk/load.lua +++ b/xmake/toolchains/ndk/load.lua @@ -20,6 +20,7 @@ -- imports import("core.base.hashset") +import("core.base.semver") import("core.project.config") -- get triple @@ -96,7 +97,7 @@ function main(toolchain) -- gnustl and stlport have been removed in ndk r18 (deprecated in ndk r17) -- https://github.com/android/ndk/wiki/Changelog-r18 local old_runtimes = {"gnustl_static", "gnustl_shared", "stlport_static", "stlport_shared"} - if ndk_sdkver < 18 then + if ndk_sdkver and semver.new(ndk_sdkver):le("r18") then toolchain:add("runtimes", tabl.unpack(old_runtimes)) end @@ -220,7 +221,7 @@ function main(toolchain) local cxxstl_sdkdir = nil local ndk_cxxstl = config.get("runtimes") or config.get("ndk_cxxstl") if ndk_cxxstl then - if (ndk_sdkver >= 18) and table.contains(old_runtimes, ndk_cxxstl) then + if (ndk_sdkver and semver.new(ndk_sdkver):ge("r18")) and table.contains(old_runtimes, ndk_cxxstl) then utils.warning("%s is was removed in ndk v%s", ndk_cxxstl, ndk_sdkver) end |
