|
4 | 4 | // RUN: %target-swift-frontend -scan-dependencies -module-name Test -module-cache-path %t/clang-module-cache -O \
|
5 | 5 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
6 | 6 | // RUN: %t/main.swift -o %t/deps.json -swift-version 5 -cache-compile-job -cas-path %t/cas -I %t/include \
|
7 |
| -// RUN: -scanner-prefix-map %swift_src_root=/^src -scanner-prefix-map %t=/^tmp |
| 7 | +// RUN: -scanner-prefix-map %swift_src_root=/^src -scanner-prefix-map %t=/^tmp -enable-cross-import-overlays |
8 | 8 |
|
9 | 9 | // RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json A > %t/A.cmd
|
10 | 10 | // RUN: %swift_frontend_plain @%t/A.cmd
|
| 11 | +// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json B > %t/B.cmd |
| 12 | +// RUN: %swift_frontend_plain @%t/B.cmd |
| 13 | +// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json _B_A > %t/BA.cmd |
| 14 | +// RUN: %swift_frontend_plain @%t/BA.cmd |
11 | 15 |
|
12 | 16 | // RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json
|
13 | 17 | // RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid
|
|
19 | 23 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
20 | 24 | // RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
|
21 | 25 | // RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t \
|
22 |
| -// RUN: /^tmp/main.swift @%t/MyApp.cmd |
| 26 | +// RUN: /^tmp/main.swift @%t/MyApp.cmd -enable-cross-import-overlays |
23 | 27 |
|
24 | 28 | // RUN: %swift-scan-test -action compute_cache_key_from_index -cas-path %t/cas -input 0 -- \
|
25 | 29 | // RUN: %target-swift-frontend \
|
|
28 | 32 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
29 | 33 | // RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
|
30 | 34 | // RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t \
|
31 |
| -// RUN: /^tmp/main.swift @%t/MyApp.cmd > %t/key.casid |
| 35 | +// RUN: /^tmp/main.swift @%t/MyApp.cmd -enable-cross-import-overlays > %t/key.casid |
32 | 36 |
|
33 | 37 | // RUN: %swift-scan-test -action replay_result -cas-path %t/cas -id @%t/key.casid -- \
|
34 | 38 | // RUN: %target-swift-frontend \
|
|
37 | 41 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
38 | 42 | // RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
|
39 | 43 | // RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t \
|
40 |
| -// RUN: /^tmp/main.swift @%t/MyApp.cmd |
| 44 | +// RUN: /^tmp/main.swift @%t/MyApp.cmd -enable-cross-import-overlays |
41 | 45 |
|
42 | 46 | //--- main.swift
|
43 | 47 | import A
|
| 48 | +import B |
44 | 49 |
|
45 | 50 | #warning("This is a warning")
|
46 | 51 |
|
47 | 52 | //--- include/A.swiftinterface
|
48 | 53 | // swift-interface-format-version: 1.0
|
49 | 54 | // swift-module-flags: -module-name A -O -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -user-module-version 1.0
|
| 55 | +public func a() { } |
| 56 | + |
| 57 | +//--- include/B.swiftinterface |
| 58 | +// swift-interface-format-version: 1.0 |
| 59 | +// swift-module-flags: -module-name B -O -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -user-module-version 1.0 |
50 | 60 | public func b() { }
|
51 | 61 |
|
| 62 | +//--- include/_B_A.swiftinterface |
| 63 | +// swift-interface-format-version: 1.0 |
| 64 | +// swift-module-flags: -module-name _B_A -O -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -user-module-version 1.0 |
| 65 | +public func b_a() { } |
| 66 | + |
| 67 | +//--- include/B.swiftcrossimport/A.swiftoverlay |
| 68 | +%YAML 1.2 |
| 69 | +--- |
| 70 | +version: 1 |
| 71 | +modules: |
| 72 | + - name: _B_A |
0 commit comments