Skip to content

Commit 2ca418f

Browse files
neonichucompnerd
andcommitted
Build: Add build of ASN1 and Certificates for SwiftPM
SwiftPM is getting new dependencies, this adds them to the Windows build. Co-authored-by: Saleem Abdulrasool <[email protected]>
1 parent 1d03053 commit 2ca418f

File tree

1 file changed

+66
-12
lines changed

1 file changed

+66
-12
lines changed

utils/build-windows-toolchain.bat

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,61 @@ cmake ^
553553
cmake --build %BuildRoot%\13 || (exit /b)
554554
cmake --build %BuildRoot%\13 --target install || (exit /b)
555555

556+
:: Build swift-asn1
557+
cmake ^
558+
-B %BuildRoot%\14 ^
559+
560+
-D BUILD_SHARED_LIBS=NO ^
561+
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
562+
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
563+
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy" ^
564+
-D CMAKE_CXX_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
565+
-D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^
566+
-D CMAKE_MT=mt ^
567+
-D CMAKE_Swift_COMPILER=%BuildRoot%/1/bin/swiftc.exe ^
568+
-D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^
569+
-D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^
570+
571+
-D CMAKE_INSTALL_PREFIX=%InstallRoot% ^
572+
573+
-D dispatch_DIR=%BuildRoot%\3\cmake\modules ^
574+
-D Foundation_DIR=%BuildRoot%\4\cmake\modules ^
575+
576+
-G Ninja ^
577+
-S %SourceRoot%\swift-asn1 || (exit /b)
578+
cmake --build %BuildRoot%\14 || (exit /b)
579+
cmake --build %BuildRoot%\14 --target install || (exit /b)
580+
581+
:: Build swift-certificates
582+
cmake ^
583+
-B %BuildRoot%\15 ^
584+
585+
-D BUILD_SHARED_LIBS=NO ^
586+
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
587+
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
588+
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy" ^
589+
-D CMAKE_CXX_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
590+
-D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^
591+
-D CMAKE_MT=mt ^
592+
-D CMAKE_Swift_COMPILER=%BuildRoot%/1/bin/swiftc.exe ^
593+
-D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^
594+
-D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^
595+
596+
-D CMAKE_INSTALL_PREFIX=%InstallRoot% ^
597+
598+
-D dispatch_DIR=%BuildRoot%\3\cmake\modules ^
599+
-D Foundation_DIR=%BuildRoot%\4\cmake\modules ^
600+
-D SwiftCrypto_DIR=%BuildRoot%\12\cmake\modules ^
601+
-D SwiftASN1_DIR=%BuildRoot%\14\cmake\modules ^
602+
603+
-G Ninja ^
604+
-S %SourceRoot%\swift-certificates || (exit /b)
605+
cmake --build %BuildRoot%\15 || (exit /b)
606+
cmake --build %BuildRoot%\15 --target install || (exit /b)
607+
556608
:: Build swift-package-manager
557609
cmake ^
558-
-B %BuildRoot%\14 ^
610+
-B %BuildRoot%\16 ^
559611

560612
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
561613
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -579,17 +631,19 @@ cmake ^
579631
-D SwiftDriver_DIR=%BuildRoot%\11\cmake\modules ^
580632
-D SwiftCrypto_DIR=%BuildRoot%\12\cmake\modules ^
581633
-D SwiftCollections_DIR=%BuildRoot%\13\cmake\modules ^
634+
-D SwiftASN1_DIR=%BuildRoot%\14\cmake\modules ^
635+
-D SwiftCertificates_DIR=%BuildRoot%\15\cmake\modules ^
582636
-D SQLite3_INCLUDE_DIR=%BuildRoot%\Library\sqlite-3.36.0\usr\include ^
583637
-D SQLite3_LIBRARY=%BuildRoot%\Library\sqlite-3.36.0\usr\lib\SQLite3.lib ^
584638

585639
-G Ninja ^
586640
-S %SourceRoot%\swiftpm || (exit /b)
587-
cmake --build %BuildRoot%\14 || (exit /b)
588-
cmake --build %BuildRoot%\14 --target install || (exit /b)
641+
cmake --build %BuildRoot%\16 || (exit /b)
642+
cmake --build %BuildRoot%\16 --target install || (exit /b)
589643

590644
:: Build IndexStoreDB
591645
cmake ^
592-
-B %BuildRoot%\15 ^
646+
-B %BuildRoot%\17 ^
593647

594648
-D BUILD_SHARED_LIBS=NO ^
595649
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
@@ -609,11 +663,11 @@ cmake ^
609663

610664
-G Ninja ^
611665
-S %SourceRoot%\indexstore-db || (exit /b)
612-
cmake --build %BuildRoot%\15 || (exit /b)
666+
cmake --build %BuildRoot%\17 || (exit /b)
613667

614668
:: Build swift-syntax
615669
cmake ^
616-
-B %BuildRoot%\16 ^
670+
-B %BuildRoot%\18 ^
617671

618672
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
619673
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -627,12 +681,12 @@ cmake ^
627681

628682
-G Ninja ^
629683
-S %SourceRoot%\swift-syntax || (exit /b)
630-
cmake --build %BuildRoot%\16 || (exit /b)
631-
cmake --build %BuildRoot%\16 --target install || (exit /b)
684+
cmake --build %BuildRoot%\18 || (exit /b)
685+
cmake --build %BuildRoot%\18 --target install || (exit /b)
632686

633687
:: Build SourceKit-LSP
634688
cmake ^
635-
-B %BuildRoot%\17 ^
689+
-B %BuildRoot%\19 ^
636690

637691
-D BUILD_SHARED_LIBS=YES ^
638692
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
@@ -657,12 +711,12 @@ cmake ^
657711
-D SwiftPM_DIR=%BuildRoot%\14\cmake\modules ^
658712
-D IndexStoreDB_DIR=%BuildRoot%\15\cmake\modules ^
659713
-D SwiftCollections_DIR=%BuildRoot%\13\cmake\modules ^
660-
-D SwiftSyntax_DIR=%BuildRoot%\16\cmake\modules ^
714+
-D SwiftSyntax_DIR=%BuildRoot%\18\cmake\modules ^
661715

662716
-G Ninja ^
663717
-S %SourceRoot%\sourcekit-lsp || (exit /b)
664-
cmake --build %BuildRoot%\17 || (exit /b)
665-
cmake --build %BuildRoot%\17 --target install || (exit /b)
718+
cmake --build %BuildRoot%\19 || (exit /b)
719+
cmake --build %BuildRoot%\19 --target install || (exit /b)
666720

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

0 commit comments

Comments
 (0)