@@ -146,10 +146,8 @@ endlocal
146
146
:: Configures, builds, and installs LLVM
147
147
setlocal enableextensions enabledelayedexpansion
148
148
149
- mkdir " %build_root% \llvm" %exitOnError%
150
- pushd " %build_root% \llvm"
151
-
152
- cmake " %source_root% \llvm" ^
149
+ cmake^
150
+ -B " %build_root% \llvm" ^
153
151
-G Ninja^
154
152
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
155
153
-DCMAKE_C_COMPILER=cl^
@@ -175,9 +173,8 @@ cmake "%source_root%\llvm"^
175
173
-DCLANG_TOOLS=" clang;clang-format;clang-headers;clang-tidy" ^
176
174
-DCMAKE_CXX_FLAGS:STRING=" /GS- /Oy" ^
177
175
-DCMAKE_EXE_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
178
- -DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO %exitOnError%
179
-
180
- popd
176
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
177
+ -S " %source_root% \llvm" %exitOnError%
181
178
182
179
cmake --build " %build_root% \llvm" %exitOnError%
183
180
cmake --build " %build_root% \llvm" --target install %exitOnError%
@@ -190,19 +187,16 @@ endlocal
190
187
:: Configures and builds CMark
191
188
setlocal enableextensions enabledelayedexpansion
192
189
193
- mkdir " %build_root% \cmark" %exitOnError%
194
- pushd " %build_root% \cmark"
195
-
196
- cmake " %source_root% \cmark" ^
190
+ cmake^
191
+ -B " %build_root% \cmark" ^
197
192
-G Ninja^
198
193
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
199
194
-DCMAKE_C_COMPILER=cl^
200
195
-DCMAKE_CXX_COMPILER=cl^
201
196
-DCMAKE_CXX_FLAGS:STRING=" /GS- /Oy" ^
202
197
-DCMAKE_EXE_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
203
- -DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO %exitOnError%
204
-
205
- popd
198
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
199
+ -S " %source_root% \cmark" %exitOnError%
206
200
207
201
cmake --build " %build_root% \cmark" %exitOnError%
208
202
@@ -214,12 +208,10 @@ endlocal
214
208
:: Configures, builds, and installs Swift and the Swift Standard Library
215
209
setlocal enableextensions enabledelayedexpansion
216
210
217
- mkdir " %build_root% \swift" %exitOnError%
218
- pushd " %build_root% \swift"
219
-
220
211
:: SWIFT_PARALLEL_LINK_JOBS=8 allows the build machine to use as many CPU as
221
212
:: possible, while not exhausting the RAM.
222
- cmake " %source_root% \swift" ^
213
+ cmake^
214
+ -B " %build_root% \swift" ^
223
215
-G Ninja^
224
216
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
225
217
-DCMAKE_C_COMPILER=cl^
@@ -247,9 +239,8 @@ cmake "%source_root%\swift"^
247
239
-DPYTHON_EXECUTABLE:PATH=%PYTHON_HOME% \python.exe^
248
240
-DCMAKE_CXX_FLAGS:STRING=" /GS- /Oy" ^
249
241
-DCMAKE_EXE_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
250
- -DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO %exitOnError%
251
-
252
- popd
242
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
243
+ -S " %source_root% \swift" %exitOnError%
253
244
254
245
cmake --build " %build_root% \swift" %exitOnError%
255
246
cmake --build " %build_root% \swift" --target install %exitOnError%
@@ -272,10 +263,8 @@ endlocal
272
263
:: Configures, builds, and installs LLDB
273
264
setlocal enableextensions enabledelayedexpansion
274
265
275
- mkdir " %build_root% \lldb" %exitOnError%
276
- pushd " %build_root% \lldb"
277
-
278
- cmake " %source_root% \lldb" ^
266
+ cmake^
267
+ -B " %build_root% \lldb" ^
279
268
-G Ninja^
280
269
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
281
270
-DCMAKE_C_COMPILER=clang-cl^
@@ -291,9 +280,8 @@ cmake "%source_root%\lldb"^
291
280
-DCMAKE_EXE_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
292
281
-DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
293
282
-DLLDB_DISABLE_PYTHON=YES^
294
- -DLLDB_INCLUDE_TESTS:BOOL=NO %exitOnError%
295
-
296
- popd
283
+ -DLLDB_INCLUDE_TESTS:BOOL=NO^
284
+ -S " %source_root% \lldb" %exitOnError%
297
285
298
286
cmake --build " %build_root% \lldb" %exitOnError%
299
287
cmake --build " %build_root% \lldb" --target install %exitOnError%
@@ -306,10 +294,8 @@ endlocal
306
294
:: Configures, builds, and installs Dispatch
307
295
setlocal enableextensions enabledelayedexpansion
308
296
309
- mkdir " %build_root% \swift-corelibs-libdispatch" %exitOnError%
310
- pushd " %build_root% \swift-corelibs-libdispatch"
311
-
312
- cmake " %source_root% \swift-corelibs-libdispatch" ^
297
+ cmake^
298
+ -B " %build_root% \swift-corelibs-libdispatch" ^
313
299
-G Ninja^
314
300
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
315
301
-DCMAKE_C_COMPILER=clang-cl^
@@ -327,10 +313,8 @@ cmake "%source_root%\swift-corelibs-libdispatch"^
327
313
-DCMAKE_SHARED_LINKER_FLAGS:STRING=" /INCREMENTAL:NO" ^
328
314
-DCMAKE_Swift_COMPILER_TARGET:STRING=x86_64-unknown-windows-msvc^
329
315
-DCMAKE_Swift_FLAGS:STRING=" -resource-dir \" %install_directory% \lib\swift\" " ^
330
- -DCMAKE_Swift_LINK_FLAGS:STRING=" -resource-dir \" %install_directory% \lib\swift\" " %exitOnError%
331
-
332
-
333
- popd
316
+ -DCMAKE_Swift_LINK_FLAGS:STRING=" -resource-dir \" %install_directory% \lib\swift\" " ^
317
+ -S " %source_root% \swift-corelibs-libdispatch" %exitOnError%
334
318
335
319
cmake --build " %build_root% \swift-corelibs-libdispatch" %exitOnError%
336
320
cmake --build " %build_root% \swift-corelibs-libdispatch" --target install %exitOnError%
0 commit comments