|
| 1 | +// RUN: %empty-directory(%t) |
| 2 | +// RUN: split-file %s %t |
| 3 | + |
| 4 | +// RUN: %target-swift-frontend -emit-module -module-name B -o %t/B.swiftmodule -swift-version 5 \ |
| 5 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 6 | +// RUN: -emit-module-interface-path %t/ignore/B.swiftinterface -enable-library-evolution \ |
| 7 | +// RUN: %t/B.swift |
| 8 | + |
| 9 | +// RUN: %target-swift-frontend -emit-module -module-name A -o %t/ignore/A.swiftmodule -swift-version 5 \ |
| 10 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 11 | +// RUN: -emit-module-interface-path %t/A.swiftinterface -enable-library-evolution -I %t \ |
| 12 | +// RUN: %t/A.swift |
| 13 | + |
| 14 | +// RUN: %target-swift-frontend -scan-dependencies -module-name Test -module-cache-path %t/clang-module-cache %t/main.swift \ |
| 15 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 16 | +// RUN: -o %t/deps.json -I %t -cache-compile-job -cas-path %t/cas -swift-version 5 |
| 17 | + |
| 18 | +// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json A > %t/A.cmd |
| 19 | +// RUN: %swift_frontend_plain @%t/A.cmd |
| 20 | + |
| 21 | +// RUN: %FileCheck %s --input-file=%t/A.cmd |
| 22 | + |
| 23 | +// CHECK-NOT: -candidate-module-file |
| 24 | + |
| 25 | +// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json |
| 26 | +// RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid |
| 27 | + |
| 28 | +// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd |
| 29 | + |
| 30 | +// RUN: %target-swift-frontend \ |
| 31 | +// RUN: -c -cache-compile-job -cas-path %t/cas \ |
| 32 | +// RUN: -disable-implicit-swift-modules -o %t/test.o\ |
| 33 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 34 | +// RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \ |
| 35 | +// RUN: -emit-reference-dependencies-path %t/test.swiftdeps -emit-dependencies \ |
| 36 | +// RUN: -primary-file %t/main.swift @%t/MyApp.cmd -emit-loaded-module-trace -emit-loaded-module-trace-path %t/test.trace.json 2>&1 \ |
| 37 | +// RUN: | %FileCheck %s --check-prefix=WARNING --allow-empty |
| 38 | + |
| 39 | +// WARNING-NOT: WARNING: |
| 40 | + |
| 41 | +// RUN: %FileCheck %s --check-prefix=TRACE --input-file=%t/test.trace.json |
| 42 | +// TRACE-DAG: A.swiftinterface |
| 43 | + |
| 44 | +// RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/test.swiftdeps > %t/test-processed.swiftdeps |
| 45 | +// RUN: %FileCheck %s --check-prefix=SWIFTDEPS --input-file=%t/test-processed.swiftdeps |
| 46 | +// SWIFTDEPS: A.swiftinterface |
| 47 | +// SWIFTDEPS: B.swiftmdoule |
| 48 | + |
| 49 | + |
| 50 | +//--- main.swift |
| 51 | +import A |
| 52 | + |
| 53 | +//--- A.swift |
| 54 | +import B |
| 55 | +func test() {} |
| 56 | + |
| 57 | +//--- B.swift |
| 58 | +func b() {} |
0 commit comments