|
3 | 3 |
|
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 |
| -// 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 -enable-cross-import-overlays |
| 6 | +// RUN: %t/main.swift -o %t/deps.json -swift-version 5 -cache-compile-job -cas-path %t/cas -I %t/include -sdk %t/sdk \ |
| 7 | +// RUN: -scanner-prefix-map %swift_src_root=/^src -scanner-prefix-map %t=/^tmp -scanner-prefix-map %t/sdk=/^sdk -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
|
|
13 | 13 | // RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json _B_A > %t/BA.cmd
|
14 | 14 | // RUN: %swift_frontend_plain @%t/BA.cmd
|
15 | 15 |
|
| 16 | +// RUN: %FileCheck %s --check-prefix=SDK-REMAP --input-file=%t/A.cmd |
| 17 | +// RUN: %FileCheck %s --check-prefix=SDK-REMAP --input-file=%t/B.cmd |
| 18 | +// RUN: %FileCheck %s --check-prefix=SDK-REMAP --input-file=%t/BA.cmd |
| 19 | + |
| 20 | +// SDK-REMAP: -isysroot |
| 21 | +// SDK-REMAP-NEXT: -Xcc |
| 22 | +// SDK-REMAP-NEXT: /^sdk |
| 23 | + |
16 | 24 | // RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json
|
17 | 25 | // RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid
|
18 | 26 | // RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd
|
19 | 27 |
|
| 28 | +// RUN: %FileCheck %s --check-prefix=SDK-REMAP --input-file=%t/MyApp.cmd |
| 29 | + |
20 | 30 | // RUN: %target-swift-frontend \
|
21 | 31 | // RUN: -c -o %t/main.o -cache-compile-job -cas-path %t/cas \
|
22 | 32 | // RUN: -swift-version 5 -disable-implicit-swift-modules \
|
23 | 33 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
24 | 34 | // RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
|
25 |
| -// RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t \ |
| 35 | +// RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t -cache-replay-prefix-map /^sdk=%t/sdk \ |
26 | 36 | // RUN: /^tmp/main.swift @%t/MyApp.cmd -enable-cross-import-overlays
|
27 | 37 |
|
28 | 38 | // RUN: %swift-scan-test -action compute_cache_key_from_index -cas-path %t/cas -input 0 -- \
|
|
31 | 41 | // RUN: -swift-version 5 -disable-implicit-swift-modules \
|
32 | 42 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
33 | 43 | // RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
|
34 |
| -// RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t \ |
| 44 | +// RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t -cache-replay-prefix-map /^sdk=%t/sdk \ |
35 | 45 | // RUN: /^tmp/main.swift @%t/MyApp.cmd -enable-cross-import-overlays > %t/key.casid
|
36 | 46 |
|
37 | 47 | // RUN: %swift-scan-test -action replay_result -cas-path %t/cas -id @%t/key.casid -- \
|
|
40 | 50 | // RUN: -swift-version 5 -disable-implicit-swift-modules \
|
41 | 51 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
42 | 52 | // RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
|
43 |
| -// RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t \ |
| 53 | +// RUN: -cache-replay-prefix-map /^src=%swift_src_root -cache-replay-prefix-map /^tmp=%t -cache-replay-prefix-map /^sdk=%t/sdk \ |
44 | 54 | // RUN: /^tmp/main.swift @%t/MyApp.cmd -enable-cross-import-overlays
|
45 | 55 |
|
46 | 56 | //--- main.swift
|
@@ -70,3 +80,5 @@ public func b_a() { }
|
70 | 80 | version: 1
|
71 | 81 | modules:
|
72 | 82 | - name: _B_A
|
| 83 | +//--- sdk/SDKSettings.json |
| 84 | +{} |
0 commit comments