-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathmodules-empty-object.swift
39 lines (26 loc) · 1.23 KB
/
modules-empty-object.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -c -I%t -parse-as-library %t/MyModuleA.swift -o %t/MyModuleA.o -emit-module -emit-module-path %t/MyModuleA.swiftmodule -emit-empty-object-file
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -c -I%t -parse-as-library %t/MyModuleB.swift -o %t/MyModuleB.o -emit-module -emit-module-path %t/MyModuleB.swiftmodule -emit-empty-object-file
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -c -I%t -parse-as-library %t/MyModuleC.swift -o %t/MyModuleC.o -emit-module -emit-module-path %t/MyModuleC.swiftmodule -emit-empty-object-file
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -c -I%t %t/Main.swift -o %t/Main.o
// RUN: %target-clang %t/Main.o %t/MyModuleA.o %t/MyModuleB.o %t/MyModuleC.o -o %t/a.out
// RUN: %target-run %t/a.out
// REQUIRES: swift_in_compiler
// REQUIRES: executable_test
// REQUIRES: swift_feature_Embedded
//--- MyModuleA.swift
public func a() {}
//--- MyModuleB.swift
import MyModuleA
public func b() {}
//--- MyModuleC.swift
import MyModuleB
public func c() {}
//--- Main.swift
import MyModuleA
import MyModuleB
import MyModuleC
a()
b()
c()