@@ -42,6 +42,14 @@ set TMPDIR=%BuildRoot%\tmp
4242
4343set NINJA_STATUS = [%% f/%% t][%% p][%% es]
4444
45+ rem TODO(compnerd) remove this clean up code once we have had enough time for
46+ rem the injection to soak.
47+ :: Clean up old deployments as that breaks the tests
48+ del /f /q " %UniversalCRTSdkDir% \Include\%UCRTVersion% \ucrt\module.modulemap"
49+ del /f /q " %UniversalCRTSdkDir% \Include\%UCRTVersion% \um\module.modulemap"
50+ del /f /q " %VCToolsInstallDir% \include\module.modulemap"
51+ del /f /q " %VCToolsInstallDir% \include\vcruntime.apinotes"
52+
4553call :CloneDependencies || (exit /b)
4654call :CloneRepositories || (exit /b)
4755
@@ -178,12 +186,6 @@ cmake ^
178186cmake --build " %BuildRoot% \curl" || (exit /b)
179187cmake --build " %BuildRoot% \curl" --target install || (exit /b)
180188
181- :: Prepare system modules
182- copy /y " %SourceRoot% \swift\stdlib\public\Platform\ucrt.modulemap" " %UniversalCRTSdkDir% \Include\%UCRTVersion% \ucrt\module.modulemap" || (exit /b)
183- copy /y " %SourceRoot% \swift\stdlib\public\Platform\winsdk.modulemap" " %UniversalCRTSdkDir% \Include\%UCRTVersion% \um\module.modulemap" || (exit /b)
184- copy /y " %SourceRoot% \swift\stdlib\public\Platform\vcruntime.modulemap" " %VCToolsInstallDir% \include\module.modulemap" || (exit /b)
185- copy /y " %SourceRoot% \swift\stdlib\public\Platform\vcruntime.apinotes" " %VCToolsInstallDir% \include\vcruntime.apinotes" || (exit /b)
186-
187189:: Build Toolchain
188190cmake ^
189191 -B " %BuildRoot% \1" ^
@@ -273,6 +275,7 @@ cmake ^
273275 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
274276 -D CMAKE_MT=mt ^
275277 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
278+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
276279 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
277280 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
278281
@@ -296,6 +299,7 @@ cmake ^
296299 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
297300 -D CMAKE_MT=mt ^
298301 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
302+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
299303 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
300304 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
301305
@@ -331,6 +335,7 @@ cmake ^
331335 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
332336 -D CMAKE_MT=mt ^
333337 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
338+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
334339 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
335340 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
336341
@@ -358,6 +363,7 @@ cmake ^
358363 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
359364 -D CMAKE_MT=mt ^
360365 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
366+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
361367 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
362368 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
363369
@@ -379,6 +385,7 @@ cmake ^
379385 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
380386 -D CMAKE_MT=mt ^
381387 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
388+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
382389 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
383390 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
384391
@@ -406,6 +413,7 @@ cmake ^
406413 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
407414 -D CMAKE_MT=mt ^
408415 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
416+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
409417 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
410418 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
411419
@@ -434,6 +442,7 @@ cmake ^
434442 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
435443 -D CMAKE_MT=mt ^
436444 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
445+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
437446 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
438447 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
439448
@@ -460,7 +469,7 @@ cmake ^
460469 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
461470 -D CMAKE_MT=mt ^
462471 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
463- -D CMAKE_Swift_FLAGS=" -Xcc -DYAML_DECLARE_EXPORT -Xcc -DWIN32" ^
472+ -D CMAKE_Swift_FLAGS=" -Xcc -DYAML_DECLARE_EXPORT -Xcc -DWIN32 -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml " ^
464473 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
465474 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
466475
@@ -485,6 +494,7 @@ cmake ^
485494 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
486495 -D CMAKE_MT=mt ^
487496 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
497+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
488498 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
489499 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
490500
@@ -518,6 +528,7 @@ cmake ^
518528 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
519529 -D CMAKE_MT=mt ^
520530 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
531+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
521532 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
522533 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
523534
@@ -541,6 +552,7 @@ cmake ^
541552 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
542553 -D CMAKE_MT=mt ^
543554 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
555+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
544556 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
545557 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
546558
@@ -562,6 +574,7 @@ cmake ^
562574 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
563575 -D CMAKE_MT=mt ^
564576 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
577+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
565578 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
566579 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
567580
@@ -597,6 +610,7 @@ cmake ^
597610 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
598611 -D CMAKE_MT=mt ^
599612 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
613+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
600614 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
601615 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
602616
@@ -640,6 +654,7 @@ cmake ^
640654 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
641655 -D CMAKE_MT=mt ^
642656 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
657+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
643658 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
644659 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
645660
0 commit comments