@@ -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" ^
@@ -275,6 +277,7 @@ cmake ^
275277 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
276278 -D CMAKE_MT=mt ^
277279 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
280+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
278281 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
279282 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
280283
@@ -298,6 +301,7 @@ cmake ^
298301 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
299302 -D CMAKE_MT=mt ^
300303 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
304+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
301305 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
302306 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
303307
@@ -333,6 +337,7 @@ cmake ^
333337 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
334338 -D CMAKE_MT=mt ^
335339 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
340+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
336341 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
337342 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
338343
@@ -360,6 +365,7 @@ cmake ^
360365 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
361366 -D CMAKE_MT=mt ^
362367 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
368+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
363369 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
364370 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
365371
@@ -381,6 +387,7 @@ cmake ^
381387 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
382388 -D CMAKE_MT=mt ^
383389 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
390+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
384391 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
385392 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
386393
@@ -408,6 +415,7 @@ cmake ^
408415 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
409416 -D CMAKE_MT=mt ^
410417 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
418+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
411419 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
412420 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
413421
@@ -436,6 +444,7 @@ cmake ^
436444 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
437445 -D CMAKE_MT=mt ^
438446 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
447+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
439448 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
440449 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
441450
@@ -462,7 +471,7 @@ cmake ^
462471 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
463472 -D CMAKE_MT=mt ^
464473 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
465- -D CMAKE_Swift_FLAGS=" -Xcc -DYAML_DECLARE_EXPORT -Xcc -DWIN32" ^
474+ -D CMAKE_Swift_FLAGS=" -Xcc -DYAML_DECLARE_EXPORT -Xcc -DWIN32 -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml " ^
466475 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
467476 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
468477
@@ -487,6 +496,7 @@ cmake ^
487496 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
488497 -D CMAKE_MT=mt ^
489498 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
499+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
490500 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
491501 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
492502
@@ -520,6 +530,7 @@ cmake ^
520530 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
521531 -D CMAKE_MT=mt ^
522532 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
533+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
523534 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
524535 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
525536
@@ -543,6 +554,7 @@ cmake ^
543554 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
544555 -D CMAKE_MT=mt ^
545556 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
557+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
546558 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
547559 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
548560
@@ -616,6 +628,7 @@ cmake ^
616628 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
617629 -D CMAKE_MT=mt ^
618630 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
631+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
619632 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
620633 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
621634
@@ -653,6 +666,7 @@ cmake ^
653666 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
654667 -D CMAKE_MT=mt ^
655668 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
669+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
656670 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
657671 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
658672
@@ -696,6 +710,7 @@ cmake ^
696710 -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
697711 -D CMAKE_MT=mt ^
698712 -D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
713+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
699714 -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
700715 -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
701716
0 commit comments