@@ -81,8 +81,10 @@ function build_tests(toolchain_name, opt)
81
81
return
82
82
end
83
83
84
+ local two_phases = (opt .two_phases == nil or opt .two_phases == true )
84
85
local policies = " --policies=build.c++.modules.std:" .. (opt .stdmodule and " y" or " n" )
85
86
policies = policies .. " ,build.c++.modules.fallbackscanner:" .. (opt .fallbackscanner and " y" or " n" )
87
+ policies = policies .. " ,build.c++.modules.two_phases:" .. (two_phases and " y" or " n" )
86
88
87
89
local platform = " "
88
90
if opt .platform then
@@ -92,10 +94,8 @@ function build_tests(toolchain_name, opt)
92
94
local runtimes = " "
93
95
if opt .runtimes then
94
96
runtimes = " --runtimes=" .. opt .runtimes .. " "
95
- print (" running with config: (toolchain: %s, compiler: %s, version: %s, runtimes: %s)" , toolchain_name , compiler , version , opt .runtimes )
96
- else
97
- print (" running with config: (toolchain: %s, compiler: %s, version: %s)" , toolchain_name , compiler , version )
98
97
end
98
+ print (" running with config: (toolchain: %s, compiler: %s, version: %s, runtimes: %s, stdmodule: %s, fallback scanner: %s, two phases: %s)" , toolchain_name , compiler , version , opt .runtimes or " default" , opt .stdmodule or false , opt .fallbackscanner or false , two_phases )
99
99
100
100
local flags = " "
101
101
if opt .flags then
@@ -124,21 +124,25 @@ function run_tests(clang_options, gcc_options, msvc_options)
124
124
if clang_options then
125
125
build_tests (" llvm" , clang_options )
126
126
build_tests (" clang" , clang_options )
127
+ build_tests (" clang" , table .join (clang_options , {two_phases = false }))
127
128
if not clang_options .disable_clang_cl then
128
129
local clang_cl_options = table .clone (clang_options )
129
130
clang_cl_options .compiler = " clang-cl"
130
131
clang_cl_options .version = CLANG_CL_MIN_VER
131
132
build_tests (" clang-cl" , clang_cl_options )
133
+ build_tests (" clang-cl" , table .join (clang_options , {two_phases = false }))
132
134
end
133
135
if not clang_options .stdmodule then
134
136
build_tests (" llvm" , clang_libcpp_options )
135
137
build_tests (" clang" , clang_libcpp_options )
138
+ build_tests (" clang" , table .join (clang_libcpp_options , {two_phases = false }))
136
139
else
137
140
wprint (" std modules tests skipped for Windows clang libc++ as it's not currently supported officially" )
138
141
end
139
142
end
140
143
if msvc_options then
141
144
build_tests (" msvc" , msvc_options )
145
+ build_tests (" msvc" , table .join (msvc_options , {two_phases = false }))
142
146
end
143
147
elseif is_subhost (" macosx" ) then
144
148
if clang_options then
@@ -161,29 +165,36 @@ function run_tests(clang_options, gcc_options, msvc_options)
161
165
end
162
166
build_tests (" llvm" , clang_options )
163
167
build_tests (" clang" , clang_options )
168
+ build_tests (" clang" , table .join (clang_options , {two_phases = false }))
164
169
end
165
170
elseif is_subhost (" msys" ) then
166
171
if clang_options then
167
172
clang_options .platform = " mingw"
168
173
clang_libcpp_options .platform = " mingw"
169
174
build_tests (" llvm" , clang_options )
170
175
build_tests (" clang" , clang_options )
176
+ build_tests (" clang" , table .join (clang_options , {two_phases = false }))
171
177
build_tests (" llvm" , clang_libcpp_options )
172
178
build_tests (" clang" , clang_libcpp_options )
179
+ build_tests (" clang" , table .join (clang_libcpp_options , {two_phases = false }))
173
180
end
174
181
if gcc_options then
175
182
gcc_options .platform = " mingw"
176
183
build_tests (" gcc" , gcc_options )
184
+ build_tests (" gcc" , table .join (gcc_options , {two_phases = false }))
177
185
end
178
186
elseif is_host (" linux" ) then
179
187
if clang_options then
180
188
build_tests (" llvm" , clang_options )
181
189
build_tests (" clang" , clang_options )
190
+ build_tests (" clang" , table .join (clang_options , {two_phases = false }))
182
191
build_tests (" llvm" , clang_libcpp_options )
183
192
build_tests (" clang" , clang_libcpp_options )
193
+ build_tests (" clang" , table .join (clang_libcpp_options , {two_phases = false }))
184
194
end
185
195
if gcc_options then
186
196
build_tests (" gcc" , gcc_options )
197
+ build_tests (" gcc" , table .join (gcc_options , {two_phases = false }))
187
198
end
188
199
end
189
200
end
0 commit comments