@@ -42,6 +42,14 @@ set TMPDIR=%BuildRoot%\tmp
42
42
43
43
set NINJA_STATUS = [%% f/%% t][%% p][%% es]
44
44
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
+
45
53
call :CloneDependencies || (exit /b)
46
54
call :CloneRepositories || (exit /b)
47
55
@@ -178,12 +186,6 @@ cmake ^
178
186
cmake --build " %BuildRoot% \curl" || (exit /b)
179
187
cmake --build " %BuildRoot% \curl" --target install || (exit /b)
180
188
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
-
187
189
:: Build Toolchain
188
190
cmake ^
189
191
-B " %BuildRoot% \1" ^
@@ -275,6 +277,7 @@ cmake ^
275
277
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
276
278
-D CMAKE_MT=mt ^
277
279
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
280
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
278
281
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
279
282
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
280
283
@@ -298,6 +301,7 @@ cmake ^
298
301
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
299
302
-D CMAKE_MT=mt ^
300
303
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
304
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
301
305
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
302
306
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
303
307
@@ -333,6 +337,7 @@ cmake ^
333
337
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
334
338
-D CMAKE_MT=mt ^
335
339
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
340
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
336
341
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
337
342
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
338
343
@@ -360,6 +365,7 @@ cmake ^
360
365
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
361
366
-D CMAKE_MT=mt ^
362
367
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
368
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
363
369
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
364
370
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
365
371
@@ -381,6 +387,7 @@ cmake ^
381
387
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
382
388
-D CMAKE_MT=mt ^
383
389
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
390
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
384
391
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
385
392
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
386
393
@@ -408,6 +415,7 @@ cmake ^
408
415
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
409
416
-D CMAKE_MT=mt ^
410
417
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
418
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
411
419
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
412
420
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
413
421
@@ -436,6 +444,7 @@ cmake ^
436
444
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
437
445
-D CMAKE_MT=mt ^
438
446
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
447
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
439
448
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
440
449
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
441
450
@@ -462,7 +471,7 @@ cmake ^
462
471
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
463
472
-D CMAKE_MT=mt ^
464
473
-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 " ^
466
475
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
467
476
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
468
477
@@ -487,6 +496,7 @@ cmake ^
487
496
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
488
497
-D CMAKE_MT=mt ^
489
498
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
499
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
490
500
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
491
501
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
492
502
@@ -520,6 +530,7 @@ cmake ^
520
530
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
521
531
-D CMAKE_MT=mt ^
522
532
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
533
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
523
534
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
524
535
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
525
536
@@ -543,6 +554,7 @@ cmake ^
543
554
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
544
555
-D CMAKE_MT=mt ^
545
556
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
557
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
546
558
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
547
559
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
548
560
@@ -616,6 +628,7 @@ cmake ^
616
628
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
617
629
-D CMAKE_MT=mt ^
618
630
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
631
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
619
632
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
620
633
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
621
634
@@ -653,6 +666,7 @@ cmake ^
653
666
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
654
667
-D CMAKE_MT=mt ^
655
668
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
669
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
656
670
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
657
671
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
658
672
@@ -696,6 +710,7 @@ cmake ^
696
710
-D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy -Xclang -fno-split-cold-code" ^
697
711
-D CMAKE_MT=mt ^
698
712
-D CMAKE_Swift_COMPILER=%BuildRoot% /1/bin/swiftc.exe ^
713
+ -D CMAKE_Swift_FLAGS=" -vfsoverlay %BuildRoot% /2/stdlib/windows-vfs-overlay.yaml" ^
699
714
-D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
700
715
-D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
701
716
0 commit comments