Skip to content

Commit 22f61df

Browse files
committed
Use %target-cpu in the tests to support running on Apple Silicon hardware
1 parent 6c11713 commit 22f61df

20 files changed

+27
-26
lines changed

test/Constraints/result_builder_availability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -target x86_64-apple-macosx10.50
1+
// RUN: %target-typecheck-verify-swift -target %target-cpu-apple-macosx10.50
22

33
// REQUIRES: OS=macosx
44

test/IRGen/weak_import_extension.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %empty-directory(%t)
22
//
3-
// RUN: %target-swift-frontend -enable-library-evolution -emit-module -target x86_64-apple-macosx10.60 -emit-module-path %t/weak_import_extension_helper.swiftmodule -parse-as-library %S/Inputs/weak_import_extension_helper.swift
4-
// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target x86_64-apple-macosx10.50 | %FileCheck %s --check-prefix=CHECK-OLD
5-
// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target x86_64-apple-macosx10.60 | %FileCheck %s --check-prefix=CHECK-NEW
3+
// RUN: %target-swift-frontend -enable-library-evolution -emit-module -target %target-cpu-apple-macosx10.60 -emit-module-path %t/weak_import_extension_helper.swiftmodule -parse-as-library %S/Inputs/weak_import_extension_helper.swift
4+
// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.50 | %FileCheck %s --check-prefix=CHECK-OLD
5+
// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.60 | %FileCheck %s --check-prefix=CHECK-NEW
66
//
77
// REQUIRES: OS=macosx
88

@@ -19,4 +19,4 @@ public func callsExtensionMethod() {
1919

2020
// CHECK-NEW: declare swiftcc %swift.metadata_response @"$s28weak_import_extension_helper3FooVMa"
2121
// CHECK-NEW: declare swiftcc void @"$s28weak_import_extension_helper3FooVACycfC"
22-
// CHECK-NEW: declare swiftcc void @"$s28weak_import_extension_helper3FooV0C6MethodyyF"
22+
// CHECK-NEW: declare swiftcc void @"$s28weak_import_extension_helper3FooV0C6MethodyyF"

test/SILOptimizer/constant_propagation_availability.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %target-swift-frontend -target x86_64-apple-macos10.15 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_15 %s
2-
// RUN: %target-swift-frontend -target x86_64-apple-macos10.14 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_14 %s
3-
// RUN: %target-swift-frontend -O -target x86_64-apple-macos10.15 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_15 %s
4-
// RUN: %target-swift-frontend -O -target x86_64-apple-macos10.14 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_14 %s
1+
// RUN: %target-swift-frontend -target %target-cpu-apple-macos10.15 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_15 %s
2+
// RUN: %target-swift-frontend -target %target-cpu-apple-macos10.14 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_14 %s
3+
// RUN: %target-swift-frontend -O -target %target-cpu-apple-macos10.15 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_15 %s
4+
// RUN: %target-swift-frontend -O -target %target-cpu-apple-macos10.14 -emit-sil %s | %FileCheck --check-prefix=CHECK-macosx10_14 %s
55

66
// REQUIRES: OS=macosx
77

test/Sema/availability_stored.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-typecheck-verify-swift
22

33
// Code should type check with a new enough deployment target:
4-
// RUN: %target-swift-frontend -typecheck %s -target x86_64-apple-macos50
4+
// RUN: %target-swift-frontend -typecheck %s -target %target-cpu-apple-macos50
55

66
// REQUIRES: OS=macosx
77

@@ -57,4 +57,4 @@ enum BadReferenceEnum2 {
5757
// expected-error@+1 {{enum cases with associated values cannot be marked potentially unavailable with '@available'}}
5858
@available(macOS 50, *)
5959
case x(NewStruct)
60-
}
60+
}

test/Sema/generalized_accessors_availability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -target x86_64-apple-macosx10.9 -typecheck -verify %s
2+
// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.9 -typecheck -verify %s
33

44
// REQUIRES: OS=macosx
55

test/Serialization/android-modules.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: CPU=arm64
2+
// UNSUPPORTED: OS=macosx
23
// RUN: %empty-directory(%t)
34
// RUN: %swift_driver_plain --driver-mode=swiftc -target aarch64-unknown-linux-android -c %s -parse-stdlib -module-name Swift -emit-module -emit-module-path %t/Swift.swiftmodule
45
// RUN: %swift_driver_plain --driver-mode=swiftc -O -target aarch64-unknown-linux-android21 -c %s -I %t

test/TBD/emit-tbd-from-driver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: echo "public func foo() -> some CustomStringConvertible { 32 }" > %t/source1.swift
55
// RUN: echo "" > %t/source2.swift
66

7-
// RUN: %target-build-swift -target x86_64-apple-macosx10.15 -module-name multifile %t/source1.swift %t/source2.swift -Xfrontend -validate-tbd-against-ir=all -emit-tbd -emit-tbd-path %t/multifile.tbd -enable-library-evolution -emit-module
7+
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.15 -module-name multifile %t/source1.swift %t/source2.swift -Xfrontend -validate-tbd-against-ir=all -emit-tbd -emit-tbd-path %t/multifile.tbd -enable-library-evolution -emit-module
88

99
// RUN: %FileCheck %s < %t/multifile.tbd
1010

test/attr/require_explicit_availability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test the -require-explicit-availability flag
22
// REQUIRES: OS=macosx
33

4-
// RUN: %swiftc_driver -typecheck -parse-as-library -target x86_64-apple-macosx10.10 -Xfrontend -verify -require-explicit-availability -require-explicit-availability-target "macOS 10.10" %s
4+
// RUN: %swiftc_driver -typecheck -parse-as-library -target %target-cpu-apple-macosx10.10 -Xfrontend -verify -require-explicit-availability -require-explicit-availability-target "macOS 10.10" %s
55

66
public struct S { // expected-warning {{public declarations should have an availability attribute when building with -require-explicit-availability}}
77
public func method() { }

test/expr/unary/keypath/keypath-availability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -target x86_64-apple-macosx10.9 -typecheck -verify %s
1+
// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.9 -typecheck -verify %s
22
// REQUIRES: OS=macosx
33

44
struct Butt {

validation-test/Sema/SwiftUI/rdar56710317.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -target x86_64-apple-macosx10.15 -swift-version 5
1+
// RUN: %target-typecheck-verify-swift -target %target-cpu-apple-macosx10.15 -swift-version 5
22
// REQUIRES: objc_interop
33
// REQUIRES: OS=macosx
44

0 commit comments

Comments
 (0)