|
| 1 | +// REQUIRES: objc_interop, OS=macosx |
1 | 2 | // RUN: %empty-directory(%t) |
2 | 3 | // RUN: mkdir -p %t/clang-module-cache |
3 | 4 | // RUN: mkdir -p %t/inputs |
4 | 5 | // RUN: echo "/// Some cool comments" > %t/foo.swift |
5 | 6 | // RUN: echo "public func foo() {}" >> %t/foo.swift |
6 | | -// RUN: %target-swift-frontend -emit-module -emit-module-path %t/inputs/Foo.swiftmodule -emit-module-interface-path %t/Foo.swiftinterface \ |
| 7 | +// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm |
| 8 | +// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm |
| 9 | +// RUN: %target-swift-frontend -emit-module -emit-module-path %t/inputs/Foo.swiftmodule -emit-module-interface-path %t/Foo.swiftinterface -alias-module-names-in-module-interface \ |
7 | 10 | // RUN: -swift-version 5 -enable-library-evolution -module-cache-path %t.module-cache %t/foo.swift -module-name Foo |
8 | 11 |
|
9 | 12 | // RUN: echo "[{" > %/t/inputs/map.json |
|
29 | 32 | // RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json |
30 | 33 | // RUN: echo "}," >> %/t/inputs/map.json |
31 | 34 | // RUN: echo "{" >> %/t/inputs/map.json |
| 35 | +// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json |
| 36 | +// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json |
| 37 | +// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json |
| 38 | +// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json |
| 39 | +// RUN: echo "}," >> %/t/inputs/map.json |
| 40 | +// RUN: echo "{" >> %/t/inputs/map.json |
| 41 | +// RUN: echo "\"moduleName\": \"_SwiftConcurrencyShims\"," >> %/t/inputs/map.json |
| 42 | +// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json |
| 43 | +// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json |
| 44 | +// RUN: echo "\"clangModulePath\": \"%t/inputs/_SwiftConcurrencyShims.pcm\"" >> %/t/inputs/map.json |
| 45 | +// RUN: echo "}," >> %/t/inputs/map.json |
| 46 | +// RUN: echo "{" >> %/t/inputs/map.json |
32 | 47 | // RUN: echo "\"moduleName\": \"_StringProcessing\"," >> %/t/inputs/map.json |
33 | 48 | // RUN: echo "\"modulePath\": \"%/string_processing_module\"," >> %/t/inputs/map.json |
34 | 49 | // RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json |
35 | 50 | // RUN: echo "}]" >> %/t/inputs/map.json |
36 | 51 |
|
37 | 52 | // RUN: %target-swift-frontend -typecheck-module-from-interface %t/Foo.swiftinterface -module-cache-path %t.module-cache \ |
38 | | -// RUN: -explicit-interface-module-build -explicit-swift-module-map-file %t/inputs/map.json -Rmodule-loading -Xcc -Rmodule-import 2>&1 | %FileCheck %s |
39 | | - |
40 | | -// CHECK-DAG: loaded module 'Swift' |
41 | | -// CHECK-DAG: loaded module '_StringProcessing' |
42 | | -// CHECK-DAG: loaded module '_Concurrency' |
| 53 | +// RUN: -explicit-interface-module-build -explicit-swift-module-map-file %t/inputs/map.json -disable-implicit-swift-modules -verify |
0 commit comments