Skip to content

Commit 283df2d

Browse files
authored
Merge pull request #38485 from artemcm/Fix55ClangTargetTest
[5.5] Update the ScanDependencies test to use %target-cpu
2 parents 3598994 + 287bbeb commit 283df2d

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-module-flags: -module-name XWithTarget -target arm64-apple-macosx10.9
3+
import Swift
4+
@_exported import X
5+
public func overlayFuncX() { }
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
// REQUIRES: VENDOR=apple
2+
// REQUIRES: OS=macosx
3+
24
// RUN: %empty-directory(%t.module-cache)
3-
// RUN: %target-swift-frontend -emit-module -o %t.foo.swiftmodule -module-cache-path %t.module-cache -I %S/Inputs/CHeaders -I %S/Inputs/Swift %s -target x86_64-apple-macosx10.14
5+
// RUN: %target-swift-frontend -emit-module -o %t.foo.swiftmodule -module-cache-path %t.module-cache -I %S/Inputs/CHeaders -I %S/Inputs/Swift %s -target %target-cpu-apple-macosx10.14
46

57
// Without -clang-target, we build two X.pcm
68
// RUN: find %t.module-cache -name "X-*.pcm" | count 2
79

810
// RUN: %empty-directory(%t.module-cache)
9-
// RUN: %target-swift-frontend -emit-module -o %t.foo.swiftmodule -module-cache-path %t.module-cache -I %S/Inputs/CHeaders -I %S/Inputs/Swift %s -target x86_64-apple-macosx10.14 -clang-target x86_64-apple-macosx10.14
11+
// RUN: %target-swift-frontend -emit-module -o %t.foo.swiftmodule -module-cache-path %t.module-cache -I %S/Inputs/CHeaders -I %S/Inputs/Swift %s -target %target-cpu-apple-macosx10.14 -clang-target %target-cpu-apple-macosx10.14
1012

1113
// With -clang-target, we build one X.pcm
1214
// RUN: find %t.module-cache -name "X-*.pcm" | count 1
15+
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t.module-cache %s -o %t.deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -target %target-cpu-apple-macosx10.14 -clang-target %target-cpu-apple-macosx10.14
1316

14-
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t.module-cache %s -o %t.deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -target x86_64-apple-macosx10.14 -clang-target x86_64-apple-macosx10.14
1517
// RUN: %FileCheck %s < %t.deps.json
1618

1719
// CHECK: "-clang-target"
18-
// CHECK-NEXT: "x86_64-apple-macosx10.14"
19-
20+
// CHECK-NEXT: "{{.*}}-apple-macosx10.14"
2021
import X
2122
import XWithTarget

0 commit comments

Comments
 (0)