1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
inherit("test_base")
import("utils.ci.is_running", {alias = "ci_is_running"})
local _CLANG_MIN_VER = "19"
local _GCC_MIN_VER = "15"
local _MSVC_MIN_VER = "14.35"
function clang_min_ver()
return _CLANG_MIN_VER
end
function gcc_min_ver()
return _GCC_MIN_VER
end
function msvc_min_ver()
return _MSVC_MIN_VER
end
function run_xmake_test(...)
local flags = ""
if ci_is_running() then
flags = "-vD"
end
local outdata, errdata = os.iorun("xmake test " .. flags)
assert(outdata, errdata)
end
function main(_)
local clang_options = {stdmodule = true, compiler = "clang", version = clang_min_ver(), after_build = run_xmake_test}
local gcc_options = {stdmodule = true, compiler = "gcc", version = gcc_min_ver(), after_build = run_xmake_test}
-- latest mingw gcc 15.1 is broken
-- 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*)'
-- 105 | __glibcxx_rwlock_timedrdlock (pthread_rwlock_t *__rwlock,
-- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- In file included from F:/msys64/mingw64/include/c++/15.1.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
-- from F:/msys64/mingw64/include/c++/15.1.0/x86_64-w64-mingw32/bits/gthr.h:157,
-- from F:/msys64/mingw64/include/c++/15.1.0/ext/atomicity.h:37,
-- from F:/msys64/mingw64/include/c++/15.1.0/bits/ios_base.h:41,
-- from F:/msys64/mingw64/include/c++/15.1.0/streambuf:45,
-- from F:/msys64/mingw64/include/c++/15.1.0/bits/streambuf_iterator.h:37,
-- from F:/msys64/mingw64/include/c++/15.1.0/iterator:68,
-- from F:/msys64/mingw64/include/c++/15.1.0/x86_64-w64-mingw32/bits/stdc++.h:56:
-- F:/msys64/mingw64/include/pthread.h:296:28: note: 'int pthread_rwlock_timedrdlock(pthread_rwlock_t*, const timespec*)' declared with internal linkage
-- 296 | WINPTHREAD_RWLOCK_DECL int pthread_rwlock_timedrdlock(pthread_rwlock_t *l, const struct timespec *ts)
-- | ^~~~~~~~~~~~~~~~~~~~~~~~~~
-- F:/msys64/mingw64/include/c++/15.1.0/shared_mutex:115:3: error: 'int std::__glibcxx_rwlock_timedwrlock(pthread_rwlock_t*, const timespec*)' exposes TU-local entity 'int pthread_rwlock_timedwrlock(pthread_rwlock_t*, const timespec*)'
-- 115 | __glibcxx_rwlock_timedwrlock (pthread_rwlock_t *__rwlock, local gcc_options = {stdmodule = true, compiler = "gcc", version = GCC_MIN_VER}
if is_subhost("msys") then
gcc_options = nil
end
local msvc_options = {stdmodule = true, version = msvc_min_ver()}
run_tests(clang_options, gcc_options, msvc_options)
end
|