Skip to content

Commit b4376c3

Browse files
committed
fix: correctly handle msys2 in CI config checks
1 parent 3e55f3d commit b4376c3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tools/options/meson.build

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ if get_option('run_in_ci')
3535

3636
endif
3737

38+
# Detect if compiling in an MSYS2-based MinGW/Clang environment
39+
host_is_msys2 = host_machine.system() == 'windows' and c.get_argument_syntax() == 'gcc'
40+
if host_is_msys2
41+
system_name = 'msys2'
42+
endif
43+
3844
clang_19_compiler = {
3945
'id': 'clang',
4046
'checks': ['>=19', '<20'],
@@ -53,17 +59,26 @@ if get_option('run_in_ci')
5359
'compilers': [clang_19_compiler],
5460
},
5561
'cross_3ds': {
56-
'compilers': [clang_19_compiler, gcc_14_compiler],
62+
'compilers': [gcc_14_compiler],
5763
},
5864
'cross_switch': {
59-
'compilers': [clang_19_compiler, gcc_14_compiler],
65+
'compilers': [gcc_14_compiler],
6066
},
6167
'cross_emscripten': {
6268
'compilers': [clang_19_compiler],
6369
},
6470
'windows': {
6571
'compilers': [msvc_compiler_current],
6672
},
73+
'msys2': {
74+
# TODO: this needs to be 14, but we can't pin the package atm, see https://github.com/OpenBrickProtocolFoundation/oopetris/pull/224
75+
'compilers': [
76+
{
77+
'id': 'gcc',
78+
'checks': ['>=15', '<16'],
79+
},
80+
],
81+
},
6782
'linux': {
6883
'compilers': [clang_19_compiler, gcc_14_compiler],
6984
},

0 commit comments

Comments
 (0)