Skip to content

Commit 955c76b

Browse files
committed
update module versions again
1 parent 895072e commit 955c76b

File tree

6 files changed

+72
-32
lines changed

6 files changed

+72
-32
lines changed

tests/projects/c++/modules/multiple_runtimes/test.lua

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ import("core.base.semver")
33
import("core.tool.toolchain")
44
import("utils.ci.is_running", {alias = "ci_is_running"})
55

6-
local CLANG_MIN_VER = "19"
7-
local GCC_MIN_VER = "15"
8-
local MSVC_MIN_VER = "14.35"
6+
local _CLANG_MIN_VER = "19"
7+
local _GCC_MIN_VER = "15"
8+
local _MSVC_MIN_VER = "14.35"
9+
10+
function clang_min_ver()
11+
return _CLANG_MIN_VER
12+
end
13+
function gcc_min_ver()
14+
return _GCC_MIN_VER
15+
end
16+
function msvc_min_ver()
17+
return _MSVC_MIN_VER
18+
end
919

1020
function _check_tool_version(name, min_ver)
1121
local tool = find_tool(name, {version = true})
@@ -34,15 +44,15 @@ end
3444

3545
function main(_)
3646
if is_subhost("windows") then
37-
if not _check_msvc_version(MSVC_MIN_VER) then
47+
if not _check_msvc_version(msvc_min_ver()) then
3848
return
3949
end
4050
-- on windows, llvm libc++ std module is currently not supported, uncommend when supported
4151
-- if not check_tool_version("clang", CLANG_MIN_VER) then
4252
-- return
4353
-- end
4454
elseif is_host("linux") then
45-
if not _check_tool_version("gcc", GCC_MIN_VER) or not _check_tool_version("clang", CLANG_MIN_VER) then
55+
if not _check_tool_version("gcc", gcc_min_ver()) or not _check_tool_version("clang", clang_min_ver()) then
4656
return
4757
end
4858
else

tests/projects/c++/modules/reuse_strict_private_defines/test.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
inherit(".test_base")
22
import("utils.ci.is_running", {alias = "ci_is_running"})
33

4-
local CLANG_MIN_VER = is_subhost("windows") and "19" or "17"
5-
local GCC_MIN_VER = "11"
6-
local MSVC_MIN_VER = "14.29"
7-
84
local PRIVATE_DEFINE = "PRIVATE_DEP_DEFINE_DO_NOT_PROPAGATE"
95
local PUBLIC_SYSINCLUDEDIR = path.translate("src/include")
106

@@ -40,8 +36,8 @@ function _build()
4036
end
4137

4238
function main(_)
43-
local clang_options = {compiler = "clang", version = CLANG_MIN_VER, build = _build}
44-
local gcc_options = {compiler = "gcc", version = GCC_MIN_VER, build = _build}
45-
local msvc_options = {version = MSVC_MIN_VER, build = _build}
39+
local clang_options = {compiler = "clang", version = clang_min_ver(), build = _build}
40+
local gcc_options = {compiler = "gcc", version = gcc_min_ver(), build = _build}
41+
local msvc_options = {version = msvc_min_ver(), build = _build}
4642
run_tests(clang_options, gcc_options, msvc_options)
4743
end
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
inherit("test_base")
22

3-
local MSVC_MIN_VER = "14.30"
3+
local _MSVC_MIN_VER = "14.30"
4+
5+
function msvc_min_ver()
6+
return _MSVC_MIN_VER
7+
end
48

59
function main(t)
610
local gcc_options = {fallbackscanner = true, compiler = "gcc", version = gcc_min_ver()}
@@ -9,7 +13,7 @@ function main(t)
913
if os.arch() == "arm64" or is_subhost("msys") then
1014
gcc_options = nil
1115
end
12-
local msvc_options = {version = MSVC_MIN_VER}
16+
local msvc_options = {version = msvc_min_ver()}
1317
-- skip clang tests, headerunits with clang is not stable
1418
run_tests(nil, gcc_options, msvc_options)
1519
end
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
inherit("test_base")
22

3-
local CLANG_MIN_VER = is_subhost("windows") and "19" or "18"
4-
local GCC_MIN_VER = "13"
5-
local MSVC_MIN_VER = "14.30"
3+
local _CLANG_MIN_VER = is_subhost("windows") and "19" or "18"
4+
local _GCC_MIN_VER = "13"
5+
local _MSVC_MIN_VER = "14.30"
6+
7+
function clang_min_ver()
8+
return _CLANG_MIN_VER
9+
end
10+
function gcc_min_ver()
11+
return _GCC_MIN_VER
12+
end
13+
function msvc_min_ver()
14+
return _MSVC_MIN_VER
15+
end
616

717
function main(_)
8-
local clang_options = {compiler = "clang", version = CLANG_MIN_VER}
9-
local gcc_options = {compiler = "gcc", version = GCC_MIN_VER}
10-
local msvc_options = {version = MSVC_MIN_VER}
18+
local clang_options = {compiler = "clang", version = clang_min_ver()}
19+
local gcc_options = {compiler = "gcc", version = gcc_min_ver()}
20+
local msvc_options = {version = msvc_min_ver()}
1121
run_tests(clang_options, gcc_options, msvc_options)
1222
end

tests/projects/c++/modules/test_stdmodules.lua

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
inherit("test_base")
22

3-
local CLANG_MIN_VER = "19"
4-
local GCC_MIN_VER = "15"
5-
local MSVC_MIN_VER = "14.35"
3+
local _CLANG_MIN_VER = "19"
4+
local _GCC_MIN_VER = "15"
5+
local _MSVC_MIN_VER = "14.35"
6+
7+
function clang_min_ver()
8+
return _CLANG_MIN_VER
9+
end
10+
function gcc_min_ver()
11+
return _GCC_MIN_VER
12+
end
13+
function msvc_min_ver()
14+
return _MSVC_MIN_VER
15+
end
616

717
function main(_)
8-
local clang_options = {stdmodule = true, compiler = "clang", version = CLANG_MIN_VER}
9-
local gcc_options = {stdmodule = true, compiler = "gcc", version = GCC_MIN_VER}
18+
local clang_options = {stdmodule = true, compiler = "clang", version = clang_min_ver()}
19+
local gcc_options = {stdmodule = true, compiler = "gcc", version = gcc_min_ver()}
1020
-- latest mingw gcc 15.1 is broken
1121
-- error: F:/msys64/mingw64/include/c++/15.1.0/shared_mutex:105:3: error: 'int std::__glibcxx_rwlock_timedrdlock(pthread_rwlock_t*, const timespec*)' exposes TU-local entity 'int pthread_rwlock_timedrdlock(pthread_rwlock_t*, const timespec*)'
1222
-- 105 | __glibcxx_rwlock_timedrdlock (pthread_rwlock_t *__rwlock,
@@ -27,6 +37,6 @@ function main(_)
2737
if is_subhost("msys") then
2838
gcc_options = nil
2939
end
30-
local msvc_options = {stdmodule = true, version = MSVC_MIN_VER}
40+
local msvc_options = {stdmodule = true, version = msvc_min_ver()}
3141
run_tests(clang_options, gcc_options, msvc_options)
3242
end

tests/projects/c++/modules/test_xmake_test_stdmodules.lua

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
inherit("test_base")
22
import("utils.ci.is_running", {alias = "ci_is_running"})
33

4-
local CLANG_MIN_VER = "19"
5-
local GCC_MIN_VER = "15"
6-
local MSVC_MIN_VER = "14.35"
4+
local _CLANG_MIN_VER = "19"
5+
local _GCC_MIN_VER = "15"
6+
local _MSVC_MIN_VER = "14.35"
7+
8+
function clang_min_ver()
9+
return _CLANG_MIN_VER
10+
end
11+
function gcc_min_ver()
12+
return _GCC_MIN_VER
13+
end
14+
function msvc_min_ver()
15+
return _MSVC_MIN_VER
16+
end
717

818
function run_xmake_test(...)
919
local flags = ""
@@ -15,8 +25,8 @@ function run_xmake_test(...)
1525
end
1626

1727
function main(_)
18-
local clang_options = {stdmodule = true, compiler = "clang", version = CLANG_MIN_VER, after_build = run_xmake_test}
19-
local gcc_options = {stdmodule = true, compiler = "gcc", version = GCC_MIN_VER, after_build = run_xmake_test}
28+
local clang_options = {stdmodule = true, compiler = "clang", version = clang_min_ver(), after_build = run_xmake_test}
29+
local gcc_options = {stdmodule = true, compiler = "gcc", version = gcc_min_ver(), after_build = run_xmake_test}
2030
-- latest mingw gcc 15.1 is broken
2131
-- error: F:/msys64/mingw64/include/c++/15.1.0/shared_mutex:105:3: error: 'int std::__glibcxx_rwlock_timedrdlock(pthread_rwlock_t*, const timespec*)' exposes TU-local entity 'int pthread_rwlock_timedrdlock(pthread_rwlock_t*, const timespec*)'
2232
-- 105 | __glibcxx_rwlock_timedrdlock (pthread_rwlock_t *__rwlock,
@@ -37,6 +47,6 @@ function main(_)
3747
if is_subhost("msys") then
3848
gcc_options = nil
3949
end
40-
local msvc_options = {stdmodule = true, version = MSVC_MIN_VER}
50+
local msvc_options = {stdmodule = true, version = msvc_min_ver()}
4151
run_tests(clang_options, gcc_options, msvc_options)
4252
end

0 commit comments

Comments
 (0)