File tree Expand file tree Collapse file tree 15 files changed +111
-53
lines changed
ModuleInterface/ModuleCache/Inputs Expand file tree Collapse file tree 15 files changed +111
-53
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,20 @@ else()
24
24
set (SWIFT_BUILD_TEST_SUPPORT_MODULES_default FALSE )
25
25
endif ()
26
26
27
+ # TODO(compnerd) use a target to avoid re-creating this file all the time
28
+ function (generate_windows_vfs_overlay )
29
+ file (TO_CMAKE_PATH ${VCToolsInstallDir} VCToolsInstallDir )
30
+ file (TO_CMAKE_PATH ${UniversalCRTSdkDir} UniversalCRTSdkDir )
31
+ configure_file ("${PROJECT_SOURCE_DIR} /cmake/WindowsVFS.yaml.in"
32
+ "${CMAKE_CURRENT_BINARY_DIR} /windows-vfs-overlay.yaml"
33
+ @ONLY )
34
+ endfunction ()
35
+ if (WINDOWS IN_LIST SWIFT_SDKS )
36
+ generate_windows_vfs_overlay ()
37
+ file (TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR} /windows-vfs-overlay.yaml"
38
+ SWIFT_WINDOWS_VFS_OVERLAY )
39
+ endif ()
40
+
27
41
#
28
42
# User-configurable options for the standard library.
29
43
#
Original file line number Diff line number Diff line change
1
+ ---
2
+ version: 0
3
+ case-sensitive: false
4
+ use-external-names: false
5
+ roots:
6
+ - name: "@UniversalCRTSdkDir@\\Include\\@UCRTVersion@\\um"
7
+ type: directory
8
+ contents:
9
+ - name: module.modulemap
10
+ type: file
11
+ external-contents: "@PROJECT_SOURCE_DIR@\\public\\Platform\\winsdk.modulemap"
12
+ - name: "@UniversalCRTSdkDir@\\Include\\@UCRTVersion@\\ucrt"
13
+ type: directory
14
+ contents:
15
+ - name: module.modulemap
16
+ type: file
17
+ external-contents: "@PROJECT_SOURCE_DIR@\\public\\Platform\\ucrt.modulemap"
18
+ - name: "@VCToolsInstallDir@\\include"
19
+ type: directory
20
+ contents:
21
+ - name: module.modulemap
22
+ type: file
23
+ external-contents: "@PROJECT_SOURCE_DIR@\\public\\Platform\\vcruntime.modulemap"
24
+ - name: vcruntime.apinotes
25
+ type: file
26
+ external-contents: "@PROJECT_SOURCE_DIR@\\public\\Platform\\vcruntime.apinotes"
27
+
Original file line number Diff line number Diff line change @@ -879,6 +879,8 @@ function(add_swift_target_library_single target name)
879
879
list (APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS
880
880
-Xcc;-Xclang;-Xcc;-ivfsoverlay;-Xcc;-Xclang;-Xcc;${SWIFTLIB_SINGLE_VFS_OVERLAY} )
881
881
endif ()
882
+ list (APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS
883
+ -vfsoverlay; "${SWIFT_WINDOWS_VFS_OVERLAY} " )
882
884
swift_windows_include_for_arch (${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE )
883
885
foreach (directory ${SWIFTLIB_INCLUDE} )
884
886
list (APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xcc;-isystem;-Xcc;${directory} )
Original file line number Diff line number Diff line change 6
6
// RUN: echo 'public func main() {}' >%t/main.swift
7
7
//
8
8
// First prime the incremental state, but note that we're building in the d c b a (reverse-alphabetical) order.
9
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift
9
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift
10
10
//
11
11
// Now perturb the interface of a.swift and delete its output
12
12
// RUN: echo 'class a { var x : Int = 10 }' >%t/a.swift
13
13
// RUN: rm %t/a.o
14
14
//
15
15
// Now rebuild, which will rebuild a.swift then do a cascading dep-graph invalidation
16
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift -driver-show-incremental -driver-show-job-lifecycle >%t/out.txt 2>&1
16
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift -driver-show-incremental -driver-show-job-lifecycle >%t/out.txt 2>&1
17
17
// RUN: %FileCheck %s <%t/out.txt
18
18
//
19
19
// Check that we saw invalidation happen in command-line argument order
Original file line number Diff line number Diff line change 10
10
// Seeing weird failure on CI, so set the mod times
11
11
// RUN: touch -t 200101010101 %t/*.swift
12
12
13
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
13
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
14
14
15
15
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
16
16
24
24
// RUN: touch -t 200101010101 %t/*.swift
25
25
// RUN: touch -t 200301010101 %t/definesAB.swift
26
26
27
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
27
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
28
28
29
29
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
30
30
Original file line number Diff line number Diff line change 10
10
// Seeing weird failure on CI, so set the mod times
11
11
// RUN: touch -t 200101010101 %t/*.swift
12
12
13
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
13
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
14
14
15
15
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
16
16
24
24
// RUN: touch -t 200101010101 %t/*.swift
25
25
// RUN: touch -t 200301010101 %t/definesAB.swift
26
26
27
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
27
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
28
28
29
29
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
30
30
Original file line number Diff line number Diff line change 10
10
// Seeing weird failure on CI, so set the mod times
11
11
// RUN: touch -t 200101010101 %t/*.swift
12
12
13
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >& %t/output3
13
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >& %t/output3
14
14
15
15
// Change one type, only uses of that type get recompiled
16
16
21
21
// RUN: touch -t 200101010101 %t/*.swift
22
22
// RUN: touch -t 200301010101 %t/definesAB.swift
23
23
24
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >& %t/output4
24
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >& %t/output4
25
25
26
26
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED-W %s < %t/output4
27
27
// RUN: %FileCheck -check-prefix=CHECK-NOT-RECOMPILED-W %s < %t/output4
Original file line number Diff line number Diff line change 10
10
// Seeing weird failure on CI, so set the mod times
11
11
// RUN: touch -t 200101010101 %t/*.swift
12
12
13
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
13
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
14
14
15
15
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
16
16
24
24
// RUN: touch -t 200101010101 %t/*.swift
25
25
// RUN: touch -t 200301010101 %t/definesAB.swift
26
26
27
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
27
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
28
28
29
29
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
30
30
Original file line number Diff line number Diff line change 10
10
// Seeing weird failure on CI, so set the mod times
11
11
// RUN: touch -t 200101010101 %t/*.swift
12
12
13
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
13
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
14
14
15
15
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
16
16
24
24
// RUN: touch -t 200101010101 %t/*.swift
25
25
// RUN: touch -t 200301010101 %t/definesAB.swift
26
26
27
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
27
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
28
28
29
29
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
30
30
Original file line number Diff line number Diff line change 10
10
// Seeing weird failure on CI, so set the mod times
11
11
// RUN: touch -t 200101010101 %t/*.swift
12
12
13
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
13
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3
14
14
15
15
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
16
16
24
24
// RUN: touch -t 200101010101 %t/*.swift
25
25
// RUN: touch -t 200301010101 %t/definesAB.swift
26
26
27
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
27
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4
28
28
29
29
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
30
30
Original file line number Diff line number Diff line change 6
6
// RUN: touch -t 200101010101 %t/*.swift
7
7
// RUN: cd %t
8
8
9
- // RUN: %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-baseline
9
+ // RUN: %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-baseline
10
10
11
11
// Change one type and cause a syntax error. This should cause _both_ files to
12
12
// rebuild.
16
16
// RUN: touch -t 200101010101 %t/*.swift
17
17
// RUN: touch -t 200301010101 %t/definesA.swift
18
18
19
- // RUN: not %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json
19
+ // RUN: not %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json
20
20
21
21
// RUN: cp %t/definesA{-three,}.swift
22
22
// RUN: touch -t 200401010101 %t/definesA.swift
23
23
24
- // RUN: not %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-incremental
24
+ // RUN: not %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-incremental
25
25
26
26
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output-incremental
27
27
Original file line number Diff line number Diff line change 5
5
// RUN: cp %t/definesPoint{-before,}.swift
6
6
// RUN: touch -t 200101010101 %t/*.swift
7
7
8
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesPoint.swift usesPoint.swift usesDisplay.swift -module-name main -output-file-map ofm.json >&output3
8
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesPoint.swift usesPoint.swift usesDisplay.swift -module-name main -output-file-map ofm.json >&output3
9
9
10
10
// Change one type - now only the user of that type rebuilds
11
11
14
14
// RUN: touch -t 200101010101 %t/*.swift
15
15
// RUN: touch -t 200301010101 %t/definesPoint.swift
16
16
17
- // RUN: cd %t && %target- swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesPoint.swift usesPoint.swift usesDisplay.swift -module-name main -output-file-map ofm.json >&output4
17
+ // RUN: cd %t && %swiftc_driver-stdlib-target -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesPoint.swift usesPoint.swift usesDisplay.swift -module-name main -output-file-map ofm.json >&output4
18
18
19
19
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output4
20
20
Original file line number Diff line number Diff line change 1
1
import sys
2
2
3
3
for input_path in sys .argv [1 :]:
4
- with open (input_path , 'r ' ) as yaml_file :
4
+ with open (input_path , 'rb ' ) as yaml_file :
5
5
# Forwarding files are YAML files that start with '---'
6
- if yaml_file .read (3 ) != '---' :
6
+ if yaml_file .read (3 ) != b '---' :
7
7
print ("swiftmodule '%s' is not a forwarding module!" % input_path )
8
8
sys .exit (1 )
You can’t perform that action at this time.
0 commit comments