Skip to content

Commit 567389c

Browse files
committed
Fix semver format
1 parent 98683d1 commit 567389c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xmake/toolchains/ndk/load.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function main(toolchain)
9797
-- gnustl and stlport have been removed in ndk r18 (deprecated in ndk r17)
9898
-- https://github.com/android/ndk/wiki/Changelog-r18
9999
local old_runtimes = {"gnustl_static", "gnustl_shared", "stlport_static", "stlport_shared"}
100-
if ndk_sdkver and semver.new(ndk_sdkver):le("r18") then
100+
if ndk_sdkver and semver.new(format("%s.0.0", ndk_sdkver)):le("18.0.0") then
101101
toolchain:add("runtimes", table.unpack(old_runtimes))
102102
end
103103

@@ -221,7 +221,7 @@ function main(toolchain)
221221
local cxxstl_sdkdir = nil
222222
local ndk_cxxstl = config.get("runtimes") or config.get("ndk_cxxstl")
223223
if ndk_cxxstl then
224-
if (ndk_sdkver and semver.new(ndk_sdkver):ge("r18")) and table.contains(old_runtimes, ndk_cxxstl) then
224+
if (ndk_sdkver and semver.new(format("%s.0.0", ndk_sdkver)):ge("18.0.0")) and table.contains(old_runtimes, ndk_cxxstl) then
225225
utils.warning("%s is was removed in ndk v%s", ndk_cxxstl, ndk_sdkver)
226226
end
227227

0 commit comments

Comments
 (0)