Skip to content

Commit 03c2ff4

Browse files
authored
[test] Make sure we don't try to autolink the framework we're building (swiftlang#20245)
...even the Clang part of it. rdar://problem/42604464
1 parent 45cbaea commit 03c2ff4

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

test/ClangImporter/MixedSource/Inputs/AutolinkingTest.framework/AutolinkingTest

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct Test {
2+
int value;
3+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
framework module AutolinkingTest {
2+
umbrella header "AutolinkingTest.h"
3+
export *
4+
module * { export * }
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-swift-frontend %s -module-name AutolinkingTest -F %S/Inputs -import-underlying-module -emit-ir | %FileCheck %s
2+
3+
// Linux uses a different autolinking mechanism, based on
4+
// swift-autolink-extract. This file tests the Darwin mechanism.
5+
// UNSUPPORTED: OS=linux-gnu
6+
// UNSUPPORTED: OS=linux-gnueabihf
7+
// UNSUPPORTED: OS=freebsd
8+
// UNSUPPORTED: OS=linux-androideabi
9+
10+
// Use a type declared in the Clang part of the module.
11+
public let y = Test()
12+
13+
// CHECK: !llvm.linker.options
14+
// CHECK-NOT: !{!"-framework", !"AutolinkingTest"}
15+
// CHECK: !{!"-lswiftCore"}
16+
// CHECK-NOT: !{!"-framework", !"AutolinkingTest"}

0 commit comments

Comments
 (0)