Skip to content

Commit c208f28

Browse files
committed
CI: add swift-system to the dependency tree
Enable building swift-system as part of the toolchain image.
1 parent 17f1cf9 commit c208f28

File tree

1 file changed

+73
-48
lines changed

1 file changed

+73
-48
lines changed

utils/build-windows-toolchain.bat

Lines changed: 73 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ cmake ^
327327
cmake --build %BuildRoot%\5 || (exit /b)
328328
cmake --build %BuildRoot%\5 --target install || (exit /b)
329329

330-
:: Build swift-tools-support-core
330+
:: Build swift-system
331331
cmake ^
332332
-B %BuildRoot%\6 ^
333333

@@ -343,19 +343,41 @@ cmake ^
343343

344344
-D CMAKE_INSTALL_PREFIX=%InstallRoot% ^
345345

346+
-G Ninja ^
347+
-S %SourceRoot%\swift-system || (exit /b)
348+
cmake --build %BuildRoot%\6 || (exit /b)
349+
cmake --build %BuildRoot%\6 --target install || (exit /b)
350+
351+
:: Build swift-tools-support-core
352+
cmake ^
353+
-B %BuildRoot%\7 ^
354+
355+
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
356+
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
357+
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy" ^
358+
-D CMAKE_CXX_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
359+
-D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^
360+
-D CMAKE_MT=mt ^
361+
-D CMAKE_Swift_COMPILER=%BuildRoot%/1/bin/swiftc.exe ^
362+
-D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^
363+
-D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^
364+
365+
-D CMAKE_INSTALL_PREFIX=%InstallRoot% ^
366+
346367
-D dispatch_DIR=%BuildRoot%\3\cmake\modules ^
347368
-D Foundation_DIR=%BuildRoot%\4\cmake\modules ^
369+
-D SwiftSystem_DIR=%BuildRoot%\6\cmake\modules ^
348370
-D SQLite3_INCLUDE_DIR=%BuildRoot%\Library\sqlite-3.36.0\usr\include ^
349371
-D SQLite3_LIBRARY=%BuildRoot%\Library\sqlite-3.36.0\usr\lib\SQLite3.lib ^
350372

351373
-G Ninja ^
352374
-S %SourceRoot%\swift-tools-support-core || (exit /b)
353-
cmake --build %BuildRoot%\6 || (exit /b)
354-
cmake --build %BuildRoot%\6 --target install || (exit /b)
375+
cmake --build %BuildRoot%\7 || (exit /b)
376+
cmake --build %BuildRoot%\7 --target install || (exit /b)
355377

356378
:: Build llbuild
357379
cmake ^
358-
-B %BuildRoot%\7 ^
380+
-B %BuildRoot%\8 ^
359381

360382
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
361383
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -378,12 +400,12 @@ cmake ^
378400

379401
-G Ninja ^
380402
-S %SourceRoot%\llbuild || (exit /b)
381-
cmake --build %BuildRoot%\7 || (exit /b)
382-
cmake --build %BuildRoot%\7 --target install || (exit /b)
403+
cmake --build %BuildRoot%\8 || (exit /b)
404+
cmake --build %BuildRoot%\8 --target install || (exit /b)
383405

384406
:: Build swift-argument-parser
385407
cmake ^
386-
-B %BuildRoot%\8 ^
408+
-B %BuildRoot%\9 ^
387409

388410
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
389411
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -403,12 +425,12 @@ cmake ^
403425

404426
-G Ninja ^
405427
-S %SourceRoot%\swift-argument-parser || (exit /b)
406-
cmake --build %BuildRoot%\8 || (exit /b)
407-
cmake --build %BuildRoot%\8 --target install || (exit /b)
428+
cmake --build %BuildRoot%\9 || (exit /b)
429+
cmake --build %BuildRoot%\9 --target install || (exit /b)
408430

409431
:: Build Yams
410432
cmake ^
411-
-B %BuildRoot%\9 ^
433+
-B %BuildRoot%\10 ^
412434

413435
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
414436
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -429,12 +451,12 @@ cmake ^
429451

430452
-G Ninja ^
431453
-S %SourceRoot%\Yams || (exit /b)
432-
cmake --build %BuildRoot%\9 || (exit /b)
433-
cmake --build %BuildRoot%\9 --target install || (exit /b)
454+
cmake --build %BuildRoot%\10 || (exit /b)
455+
cmake --build %BuildRoot%\10 --target install || (exit /b)
434456

435457
:: Build swift-driver
436458
cmake ^
437-
-B %BuildRoot%\10 ^
459+
-B %BuildRoot%\11 ^
438460

439461
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
440462
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -451,19 +473,20 @@ cmake ^
451473
-D dispatch_DIR=%BuildRoot%\3\cmake\modules ^
452474
-D Foundation_DIR=%BuildRoot%\4\cmake\modules ^
453475
-D XCTest_DIR=%BuildRoot%\5\cmake\modules ^
454-
-D TSC_DIR=%BuildRoot%\6\cmake\modules ^
455-
-D LLBuild_DIR=%BuildRoot%\7\cmake\modules ^
456-
-D ArgumentParser_DIR=%BuildRoot%\8\cmake\modules ^
457-
-D Yams_DIR=%BuildRoot%\9\cmake\modules ^
476+
-D SwiftSystem_DIR=%BuildRoot%\6\cmake\modules ^
477+
-D TSC_DIR=%BuildRoot%\7\cmake\modules ^
478+
-D LLBuild_DIR=%BuildRoot%\8\cmake\modules ^
479+
-D ArgumentParser_DIR=%BuildRoot%\9\cmake\modules ^
480+
-D Yams_DIR=%BuildRoot%\10\cmake\modules ^
458481

459482
-G Ninja ^
460483
-S %SourceRoot%\swift-driver || (exit /b)
461-
cmake --build %BuildRoot%\10 || (exit /b)
462-
cmake --build %BuildRoot%\10 --target install || (exit /b)
484+
cmake --build %BuildRoot%\11 || (exit /b)
485+
cmake --build %BuildRoot%\11 --target install || (exit /b)
463486

464487
:: Build swift-crypto
465488
cmake ^
466-
-B %BuildRoot%\11 ^
489+
-B %BuildRoot%\12 ^
467490

468491
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
469492
-D CMAKE_C_COMPILER=cl ^
@@ -482,12 +505,12 @@ cmake ^
482505

483506
-G Ninja ^
484507
-S %SourceRoot%\swift-crypto || (exit /b)
485-
cmake --build %BuildRoot%\11 || (exit /b)
486-
cmake --build %BuildRoot%\11 --target install || (exit /b)
508+
cmake --build %BuildRoot%\12 || (exit /b)
509+
cmake --build %BuildRoot%\12 --target install || (exit /b)
487510

488511
:: Build swift-collections
489512
cmake ^
490-
-B %BuildRoot%\12 ^
513+
-B %BuildRoot%\13 ^
491514

492515
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
493516
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -503,12 +526,12 @@ cmake ^
503526

504527
-G Ninja ^
505528
-S %SourceRoot%\swift-collections || (exit /b)
506-
cmake --build %BuildRoot%\12 || (exit /b)
507-
cmake --build %BuildRoot%\12 --target install || (exit /b)
529+
cmake --build %BuildRoot%\13 || (exit /b)
530+
cmake --build %BuildRoot%\13 --target install || (exit /b)
508531

509532
:: Build swift-package-manager
510533
cmake ^
511-
-B %BuildRoot%\13 ^
534+
-B %BuildRoot%\14 ^
512535

513536
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
514537
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -524,22 +547,23 @@ cmake ^
524547

525548
-D dispatch_DIR=%BuildRoot%\3\cmake\modules ^
526549
-D Foundation_DIR=%BuildRoot%\4\cmake\modules ^
527-
-D TSC_DIR=%BuildRoot%\6\cmake\modules ^
528-
-D LLBuild_DIR=%BuildRoot%\7\cmake\modules ^
529-
-D ArgumentParser_DIR=%BuildRoot%\8\cmake\modules ^
530-
-D Yams_DIR=%BuildRoot%\9\cmake\modules ^
531-
-D SwiftDriver_DIR=%BuildRoot%\10\cmake\modules ^
532-
-D SwiftCrypto_DIR=%BuildRoot%\11\cmake\modules ^
533-
-D SwiftCollections_DIR=%BuildRoot%\12\cmake\modules ^
550+
-D SwiftSystem_DIR=%BuildRoot%\6\cmake\modules ^
551+
-D TSC_DIR=%BuildRoot%\7\cmake\modules ^
552+
-D LLBuild_DIR=%BuildRoot%\8\cmake\modules ^
553+
-D ArgumentParser_DIR=%BuildRoot%\9\cmake\modules ^
554+
-D Yams_DIR=%BuildRoot%\10\cmake\modules ^
555+
-D SwiftDriver_DIR=%BuildRoot%\11\cmake\modules ^
556+
-D SwiftCrypto_DIR=%BuildRoot%\12\cmake\modules ^
557+
-D SwiftCollections_DIR=%BuildRoot%\13\cmake\modules ^
534558

535559
-G Ninja ^
536560
-S %SourceRoot%\swiftpm || (exit /b)
537-
cmake --build %BuildRoot%\13 || (exit /b)
538-
cmake --build %BuildRoot%\13 --target install || (exit /b)
561+
cmake --build %BuildRoot%\14 || (exit /b)
562+
cmake --build %BuildRoot%\14 --target install || (exit /b)
539563

540564
:: Build IndexStoreDB
541565
cmake ^
542-
-B %BuildRoot%\14 ^
566+
-B %BuildRoot%\15 ^
543567

544568
-D BUILD_SHARED_LIBS=YES ^
545569
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
@@ -559,12 +583,12 @@ cmake ^
559583

560584
-G Ninja ^
561585
-S %SourceRoot%\indexstore-db || (exit /b)
562-
cmake --build %BuildRoot%\14 || (exit /b)
563-
cmake --build %BuildRoot%\14 --target install || (exit /b)
586+
cmake --build %BuildRoot%\15 || (exit /b)
587+
cmake --build %BuildRoot%\15 --target install || (exit /b)
564588

565589
:: Build SourceKit-LSP
566590
cmake ^
567-
-B %BuildRoot%\15 ^
591+
-B %BuildRoot%\16 ^
568592

569593
-D BUILD_SHARED_LIBS=YES ^
570594
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
@@ -581,18 +605,19 @@ cmake ^
581605

582606
-D dispatch_DIR=%BuildRoot%\3\cmake\modules ^
583607
-D Foundation_DIR=%BuildRoot%\4\cmake\modules ^
584-
-D TSC_DIR=%BuildRoot%\6\cmake\modules ^
585-
-D LLBuild_DIR=%BuildRoot%\7\cmake\modules ^
586-
-D ArgumentParser_DIR=%BuildRoot%\8\cmake\modules ^
587-
-D Yams_DIR=%BuildRoot%\9\cmake\modules ^
588-
-D SwiftPM_DIR=%BuildRoot%\13\cmake\modules ^
589-
-D IndexStoreDB_DIR=%BuildRoot%\14\cmake\modules ^
590-
-D SwiftCollections_DIR=%BuildRoot%\12\cmake\modules ^
608+
-D SwiftSystem_DIR=%BuildRoot%\6\cmake\modules ^
609+
-D TSC_DIR=%BuildRoot%\7\cmake\modules ^
610+
-D LLBuild_DIR=%BuildRoot%\8\cmake\modules ^
611+
-D ArgumentParser_DIR=%BuildRoot%\9\cmake\modules ^
612+
-D Yams_DIR=%BuildRoot%\10\cmake\modules ^
613+
-D SwiftPM_DIR=%BuildRoot%\14\cmake\modules ^
614+
-D IndexStoreDB_DIR=%BuildRoot%\15\cmake\modules ^
615+
-D SwiftCollections_DIR=%BuildRoot%\13\cmake\modules ^
591616

592617
-G Ninja ^
593618
-S %SourceRoot%\sourcekit-lsp || (exit /b)
594-
cmake --build %BuildRoot%\15 || (exit /b)
595-
cmake --build %BuildRoot%\15 --target install || (exit /b)
619+
cmake --build %BuildRoot%\16 || (exit /b)
620+
cmake --build %BuildRoot%\16 --target install || (exit /b)
596621

597622
:: Create Configuration Files
598623
python -c "import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }), encoding='utf-8'))" > %SDKInstallRoot%\SDKSettings.plist

0 commit comments

Comments
 (0)