Skip to content

Commit 19282e9

Browse files
committed
build: build SwiftSyntax before the toolchain build
Perform a build of Swift Syntax prior to the build of the toolchain so that we can enable the early swift syntax parser builds. This is a prerequisite for enabling macros on Windows.
1 parent 113f669 commit 19282e9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

utils/build-windows-toolchain.bat

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,30 @@ cmake ^
188188
cmake --build "%BuildRoot%\curl" || (exit /b)
189189
cmake --build "%BuildRoot%\curl" --target install || (exit /b)
190190

191+
:: Build Swift Syntax
192+
cmake ^
193+
-B "%BuildRoot%\99" ^
194+
195+
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
196+
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
197+
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy" ^
198+
-D CMAKE_CXX_COMPILER=cl ^
199+
-D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^
200+
-D CMAKE_MT=mt ^
201+
-D CMAKE_Swift_COMPILER=%BuildRoot%/toolchains/PFiles64/Swift/Toolchains/0.0.0+Asserts/usr/bin/swiftc.exe ^
202+
-D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^
203+
-D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^
204+
-D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^
205+
206+
-D CMAKE_INSTALL_PREFIX="%InstallRoot%" ^
207+
208+
-D SWIFT_SYNTAX_ENABLE_WMO_PRE_3_26=YES ^
209+
210+
-G Ninja ^
211+
-S %SourceRoot%\swift-syntax || (exit /b)
212+
cmake --build %BuildRoot%\99 || (exit /b)
213+
cmake --build %BuildRoot%\99 --target install || (exit /b)
214+
191215
:: Build Toolchain
192216
cmake ^
193217
-B "%BuildRoot%\1" ^

0 commit comments

Comments
 (0)