|
6 | 6 | // RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -target-sdk-name A -o %t/build -parse-stdlib -module-cache-path %t/cache
|
7 | 7 |
|
8 | 8 | /// Building Client against SDK A should work fine as expected.
|
9 |
| -// RUN: %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name A -I %t/build -parse-stdlib -module-cache-path %t/cache |
| 9 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_PER_SDK=true \ |
| 10 | +// RUN: %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name A -I %t/build -parse-stdlib -module-cache-path %t/cache |
10 | 11 |
|
11 | 12 | /// Build Client against SDK B, this should fail at loading Lib against a different SDK than A.
|
12 |
| -// RUN: not %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name B -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s -check-prefix=CHECK-AvsB |
| 13 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_PER_SDK=true \ |
| 14 | +// RUN: not %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name B -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s -check-prefix=CHECK-AvsB |
13 | 15 | // CHECK-AvsB: cannot load module 'Lib' built with SDK 'A' when using SDK 'B': {{.*}}Lib.swiftmodule
|
14 | 16 |
|
15 | 17 | /// Build Client against SDK A.Secret, this should accept the SDK as being a super set of A.
|
16 |
| -// RUN: %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name A.Secret -I %t/build -parse-stdlib -module-cache-path %t/cache |
| 18 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_PER_SDK=true \ |
| 19 | +// RUN: %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name A.Secret -I %t/build -parse-stdlib -module-cache-path %t/cache |
17 | 20 |
|
18 | 21 | /// Build Lib against SDK C.Secret and Client against SDK C, this should be rejected.
|
19 | 22 | // RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -target-sdk-name C.Secret -o %t/build -parse-stdlib -module-cache-path %t/cache
|
20 |
| -// RUN: not %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name C -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s -check-prefix=CHECK-C |
| 23 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_PER_SDK=true \ |
| 24 | +// RUN: not %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name C -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s -check-prefix=CHECK-C |
21 | 25 | // CHECK-C: cannot load module 'Lib' built with SDK 'C.Secret' when using SDK 'C': {{.*}}Lib.swiftmodule
|
22 | 26 |
|
23 | 27 | /// Build a resilient Lib against SDK A, and a client against SDK B.
|
24 | 28 | /// This should succeed after rebuilding from the swiftinterface.
|
25 | 29 | // RUN: %empty-directory(%t/cache)
|
26 | 30 | // RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -target-sdk-name A -o %t/build -parse-stdlib -module-cache-path %t/cache \
|
27 | 31 | // RUN: -enable-library-evolution -emit-module-interface-path %t/build/Lib.swiftinterface
|
28 |
| -// RUN: %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name B -I %t/build -parse-stdlib -module-cache-path %t/cache \ |
| 32 | +// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_PER_SDK=true \ |
| 33 | +// RUN: %target-swift-frontend -typecheck %t/Client.swift -swift-version 5 -target-sdk-name B -I %t/build -parse-stdlib -module-cache-path %t/cache \ |
29 | 34 | // RUN: -Rmodule-interface-rebuild 2>&1 | %FileCheck %s -check-prefix=CHECK-AvsB-REBUILD
|
30 | 35 | // CHECK-AvsB-REBUILD: remark: rebuilding module 'Lib' from interface
|
31 | 36 |
|
|
0 commit comments