Skip to content

Commit b19e8cd

Browse files
committed
Update Windows Toolchain Build for LSP to Include SwiftSyntax
1 parent 9b23eae commit b19e8cd

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

utils/build-windows-toolchain.bat

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,31 @@ cmake ^
608608
cmake --build %BuildRoot%\15 || (exit /b)
609609
cmake --build %BuildRoot%\15 --target install || (exit /b)
610610

611-
:: Build SourceKit-LSP
611+
:: Build swift-syntax
612612
cmake ^
613613
-B %BuildRoot%\16 ^
614614

615+
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
616+
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
617+
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy" ^
618+
-D CMAKE_CXX_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
619+
-D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^
620+
-D CMAKE_MT=mt ^
621+
-D CMAKE_Swift_COMPILER=%BuildRoot%/1/bin/swiftc.exe ^
622+
-D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^
623+
-D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^
624+
625+
-D CMAKE_INSTALL_PREFIX=%InstallRoot% ^
626+
627+
-G Ninja ^
628+
-S %SourceRoot%\swift-argument-parser || (exit /b)
629+
cmake --build %BuildRoot%\16 || (exit /b)
630+
cmake --build %BuildRoot%\16 --target install || (exit /b)
631+
632+
:: Build SourceKit-LSP
633+
cmake ^
634+
-B %BuildRoot%\17 ^
635+
615636
-D BUILD_SHARED_LIBS=YES ^
616637
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
617638
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -635,11 +656,12 @@ cmake ^
635656
-D SwiftPM_DIR=%BuildRoot%\14\cmake\modules ^
636657
-D IndexStoreDB_DIR=%BuildRoot%\15\cmake\modules ^
637658
-D SwiftCollections_DIR=%BuildRoot%\13\cmake\modules ^
659+
-D SwiftSyntax_DIR=%BuildRoot%\16\cmake\modules ^
638660

639661
-G Ninja ^
640662
-S %SourceRoot%\sourcekit-lsp || (exit /b)
641-
cmake --build %BuildRoot%\16 || (exit /b)
642-
cmake --build %BuildRoot%\16 --target install || (exit /b)
663+
cmake --build %BuildRoot%\17 || (exit /b)
664+
cmake --build %BuildRoot%\17 --target install || (exit /b)
643665

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

0 commit comments

Comments
 (0)