Skip to content

Commit 7a81fcc

Browse files
committed
Add test to check if -enable-ossa-modules is inherited by its dependencies
1 parent dd037f8 commit 7a81fcc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// REQUIRES: objc_interop
2+
// RUN: %empty-directory(%t)
3+
// RUN: mkdir -p %t/clang-module-cache
4+
// RUN: mkdir -p %t/Frameworks
5+
// RUN: mkdir -p %t/Frameworks/E.framework/
6+
// RUN: mkdir -p %t/Frameworks/E.framework/Modules
7+
// RUN: mkdir -p %t/Frameworks/E.framework/Modules/E.swiftmodule
8+
9+
// Copy over the interface
10+
// RUN: cp %S/Inputs/Swift/E.swiftinterface %t/Frameworks/E.framework/Modules/E.swiftmodule/%module-target-triple.swiftinterface
11+
12+
// Run the scan
13+
// RUN: %target-swift-frontend -scan-dependencies -enable-ossa-modules -disable-implicit-swift-modules -module-load-mode prefer-interface %s -o %t/deps.json -F %t/Frameworks/ -sdk %t
14+
// RUN: %validate-json %t/deps.json | %FileCheck %s
15+
16+
import E
17+
18+
// CHECK: E.swiftmodule/{{.*}}.swiftinterface
19+
// CHECK: "commandLine": [
20+
// CHECK: "-enable-ossa-modules"
21+
// CHECK: ]

0 commit comments

Comments
 (0)