Skip to content

Commit 2d3533d

Browse files
committed
Revert "stdlib: remove the dependency on the injected modules"
This reverts commit 4075d70.
1 parent be4400f commit 2d3533d

15 files changed

+53
-111
lines changed

stdlib/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ else()
2424
set(SWIFT_BUILD_TEST_SUPPORT_MODULES_default FALSE)
2525
endif()
2626

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-
4127
#
4228
# User-configurable options for the standard library.
4329
#

stdlib/cmake/WindowsVFS.yaml.in

Lines changed: 0 additions & 27 deletions
This file was deleted.

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,6 @@ function(add_swift_target_library_single target name)
879879
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS
880880
-Xcc;-Xclang;-Xcc;-ivfsoverlay;-Xcc;-Xclang;-Xcc;${SWIFTLIB_SINGLE_VFS_OVERLAY})
881881
endif()
882-
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS
883-
-vfsoverlay;"${SWIFT_WINDOWS_VFS_OVERLAY}")
884882
swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
885883
foreach(directory ${SWIFTLIB_INCLUDE})
886884
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xcc;-isystem;-Xcc;${directory})

test/Driver/batch_mode_dependencies_make_wrong_order.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
// REQUIRES: rdar106170241
88

99
// First prime the incremental state, but note that we're building in the d c b a (reverse-alphabetical) order.
10-
// 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+
// 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
1111
//
1212
// Now perturb the interface of a.swift and delete its output
1313
// RUN: echo 'class a { var x : Int = 10 }' >%t/a.swift
1414
// RUN: rm %t/a.o
1515
//
1616
// Now rebuild, which will rebuild a.swift then do a cascading dep-graph invalidation
17-
// 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+
// 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
1818
// RUN: %FileCheck %s <%t/out.txt
1919
//
2020
// Check that we saw invalidation happen in command-line argument order

test/Incremental/Fingerprints/class-fingerprint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Seeing weird failure on CI, so set the mod times
1111
// RUN: touch -t 200101010101 %t/*.swift
1212

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
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
1414

1515
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
1616

@@ -24,7 +24,7 @@
2424
// RUN: touch -t 200101010101 %t/*.swift
2525
// RUN: touch -t 200301010101 %t/definesAB.swift
2626

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
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
2828

2929
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
3030

test/Incremental/Fingerprints/enum-fingerprint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Seeing weird failure on CI, so set the mod times
1111
// RUN: touch -t 200101010101 %t/*.swift
1212

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
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
1414

1515
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
1616

@@ -24,7 +24,7 @@
2424
// RUN: touch -t 200101010101 %t/*.swift
2525
// RUN: touch -t 200301010101 %t/definesAB.swift
2626

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
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
2828

2929
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
3030

test/Incremental/Fingerprints/extension-adds-member.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Seeing weird failure on CI, so set the mod times
1111
// RUN: touch -t 200101010101 %t/*.swift
1212

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
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
1414

1515
// Change one type, only uses of that type get recompiled
1616

@@ -21,7 +21,7 @@
2121
// RUN: touch -t 200101010101 %t/*.swift
2222
// RUN: touch -t 200301010101 %t/definesAB.swift
2323

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
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
2525

2626
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED-W %s < %t/output4
2727
// RUN: %FileCheck -check-prefix=CHECK-NOT-RECOMPILED-W %s < %t/output4

test/Incremental/Fingerprints/nested-enum-fingerprint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Seeing weird failure on CI, so set the mod times
1111
// RUN: touch -t 200101010101 %t/*.swift
1212

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
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
1414

1515
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
1616

@@ -24,7 +24,7 @@
2424
// RUN: touch -t 200101010101 %t/*.swift
2525
// RUN: touch -t 200301010101 %t/definesAB.swift
2626

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
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
2828

2929
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
3030

test/Incremental/Fingerprints/protocol-fingerprint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Seeing weird failure on CI, so set the mod times
1111
// RUN: touch -t 200101010101 %t/*.swift
1212

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
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
1414

1515
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
1616

@@ -24,7 +24,7 @@
2424
// RUN: touch -t 200101010101 %t/*.swift
2525
// RUN: touch -t 200301010101 %t/definesAB.swift
2626

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
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
2828

2929
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
3030

test/Incremental/Fingerprints/struct-fingerprint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Seeing weird failure on CI, so set the mod times
1111
// RUN: touch -t 200101010101 %t/*.swift
1212

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
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
1414

1515
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps
1616

@@ -24,7 +24,7 @@
2424
// RUN: touch -t 200101010101 %t/*.swift
2525
// RUN: touch -t 200301010101 %t/definesAB.swift
2626

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
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
2828

2929
// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps
3030

test/Incremental/cross-file-failure.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// RUN: touch -t 200101010101 %t/*.swift
77
// RUN: cd %t
88

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
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
1010

1111
// Change one type and cause a syntax error. This should cause _both_ files to
1212
// rebuild.
@@ -16,12 +16,12 @@
1616
// RUN: touch -t 200101010101 %t/*.swift
1717
// RUN: touch -t 200301010101 %t/definesA.swift
1818

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
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
2020

2121
// RUN: cp %t/definesA{-three,}.swift
2222
// RUN: touch -t 200401010101 %t/definesA.swift
2323

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
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
2525

2626
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output-incremental
2727

test/Incremental/superfluous-cascade.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: cp %t/definesPoint{-before,}.swift
66
// RUN: touch -t 200101010101 %t/*.swift
77

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
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
99

1010
// Change one type - now only the user of that type rebuilds
1111

@@ -14,7 +14,7 @@
1414
// RUN: touch -t 200101010101 %t/*.swift
1515
// RUN: touch -t 200301010101 %t/definesPoint.swift
1616

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
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
1818

1919
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output4
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import sys
22

33
for input_path in sys.argv[1:]:
4-
with open(input_path, 'rb') as yaml_file:
4+
with open(input_path, 'r') as yaml_file:
55
# Forwarding files are YAML files that start with '---'
6-
if yaml_file.read(3) != b'---':
6+
if yaml_file.read(3) != '---':
77
print("swiftmodule '%s' is not a forwarding module!" % input_path)
88
sys.exit(1)

0 commit comments

Comments
 (0)