Skip to content

Commit d6f722e

Browse files
committed
Update Windows Toolchain Build for LSP to Include SwiftSyntax
1 parent 513b9cb commit d6f722e

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

utils/build-windows-toolchain.bat

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,29 @@ 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_MT=mt ^
619+
-D CMAKE_Swift_COMPILER=%BuildRoot%/1/bin/swiftc.exe ^
620+
-D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^
621+
-D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^
622+
623+
-D CMAKE_INSTALL_PREFIX=%InstallRoot% ^
624+
625+
-G Ninja ^
626+
-S %SourceRoot%\swift-syntax || (exit /b)
627+
cmake --build %BuildRoot%\16 || (exit /b)
628+
cmake --build %BuildRoot%\16 --target install || (exit /b)
629+
630+
:: Build SourceKit-LSP
631+
cmake ^
632+
-B %BuildRoot%\17 ^
633+
615634
-D BUILD_SHARED_LIBS=YES ^
616635
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
617636
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
@@ -635,11 +654,12 @@ cmake ^
635654
-D SwiftPM_DIR=%BuildRoot%\14\cmake\modules ^
636655
-D IndexStoreDB_DIR=%BuildRoot%\15\cmake\modules ^
637656
-D SwiftCollections_DIR=%BuildRoot%\13\cmake\modules ^
657+
-D SwiftSyntax_DIR=%BuildRoot%\16\cmake\modules ^
638658

639659
-G Ninja ^
640660
-S %SourceRoot%\sourcekit-lsp || (exit /b)
641-
cmake --build %BuildRoot%\16 || (exit /b)
642-
cmake --build %BuildRoot%\16 --target install || (exit /b)
661+
cmake --build %BuildRoot%\17 || (exit /b)
662+
cmake --build %BuildRoot%\17 --target install || (exit /b)
643663

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

0 commit comments

Comments
 (0)