|
| 1 | +// RUN: %empty-directory(%t) |
| 2 | +// RUN: split-file %s %t --leading-lines |
| 3 | + |
| 4 | +/// Build one library module |
| 5 | +// RUN: %target-swift-frontend -parse-stdlib -emit-module \ |
| 6 | +// RUN: -o %t/Lib.swiftmodule %t/Lib.swift \ |
| 7 | +// RUN: -emit-module-interface-path %t/Lib.swiftinterface \ |
| 8 | +// RUN: -swift-version 5 -enable-library-evolution -module-name Lib |
| 9 | + |
| 10 | +/// Distributed scenario with only the swiftinterface |
| 11 | +// RUN: rm %t/Lib.swiftmodule |
| 12 | +// RUN: %empty-directory(%t/ModuleCache) |
| 13 | + |
| 14 | +/// Rebuild from the swiftinterface just once for non-C++ users |
| 15 | +// RUN: %target-swift-frontend -parse-stdlib -typecheck %t/Rebuild.swift -I %t \ |
| 16 | +// RUN: -module-cache-path %t/ModuleCache -Rmodule-interface-rebuild -verify |
| 17 | +// RUN: %target-swift-frontend -parse-stdlib -typecheck %t/UseExisting.swift -I %t \ |
| 18 | +// RUN: -module-cache-path %t/ModuleCache -Rmodule-interface-rebuild -verify |
| 19 | + |
| 20 | +/// Rebuild from the swiftinterface just once for C++ users |
| 21 | +// RUN: %target-swift-frontend -parse-stdlib -typecheck %t/Rebuild.swift -I %t \ |
| 22 | +// RUN: -module-cache-path %t/ModuleCache -Rmodule-interface-rebuild -verify \ |
| 23 | +// RUN: -cxx-interoperability-mode=default |
| 24 | +// RUN: %target-swift-frontend -parse-stdlib -typecheck %t/UseExisting.swift -I %t \ |
| 25 | +// RUN: -module-cache-path %t/ModuleCache -Rmodule-interface-rebuild -verify \ |
| 26 | +// RUN: -cxx-interoperability-mode=default |
| 27 | + |
| 28 | +//--- Lib.swift |
| 29 | +public func publicFunction() {} |
| 30 | + |
| 31 | +//--- UseExisting.swift |
| 32 | +import Lib |
| 33 | + |
| 34 | +//--- Rebuild.swift |
| 35 | +import Lib // expected-remark {{rebuilding module 'Lib' from interface}} |
0 commit comments