Skip to content

Commit 6a718be

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

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
// RUN: echo "---" > %t/blocklist.yml
10+
// RUN: echo "action:" >> %t/blocklist.yml
11+
12+
// Copy over the interface
13+
// RUN: cp %S/Inputs/Swift/E.swiftinterface %t/Frameworks/E.framework/Modules/E.swiftmodule/%module-target-triple.swiftinterface
14+
15+
// Run the scan
16+
// 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
17+
// RUN: %validate-json %t/deps.json | %FileCheck %s
18+
19+
import E
20+
21+
// CHECK: E.swiftmodule/{{.*}}.swiftinterface
22+
// CHECK: "commandLine": [
23+
// CHECK: "-enable-ossa-modules"
24+
// CHECK: ]

0 commit comments

Comments
 (0)