Skip to content

Commit 6227a2f

Browse files
committed
Add lit feature for stdlib variants
1 parent 51ad685 commit 6227a2f

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

stdlib/public/core/Algorithm.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,4 @@ extension EnumeratedSequence: Sequence {
160160
}
161161

162162
@available(SwiftStdlib 5.11, *)
163-
public func hello() {
164-
print("hello!")
165-
}
163+
public func hello() {}

test/abi/macOS/arm64/stdlib.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
// RUN: diff -u %S/../../Inputs/macOS/arm64/stdlib/baseline %t/symbols
88

99
// REQUIRES: swift_stdlib_no_asserts
10-
// REQUIRES: OS=macosx
11-
12-
// FIXME: This isn't technically required. We really want a STDLIB_ARCH=arm64
13-
// feature that tells us we've built an arm64 version of the standard library.
14-
// REQUIRES: CPU=arm64
10+
// REQUIRES: STDLIB_VARIANT=macosx-arm64
1511

1612
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment below.)
1713

test/abi/macOS/x86_64/stdlib.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
// RUN: diff -u %S/../../Inputs/macOS/x86_64/stdlib/baseline %t/symbols
88

99
// REQUIRES: swift_stdlib_no_asserts
10-
// REQUIRES: OS=macosx
11-
12-
// FIXME: This isn't technically required. We really want a STDLIB_ARCH=x86_64
13-
// feature that tells us we've built an x86_64 version of the standard library.
14-
// REQUIRES: CPU=x86_64
10+
// REQUIRES: STDLIB_VARIANT=macosx-x86_64
1511

1612
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment below.)
1713

test/lit.site.cfg.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ config.testing_against_host_compiler = \
7373

7474
# Please remember to handle empty strings and/or unset variables correctly.
7575

76+
config.available_features.add("STDLIB_VARIANT={}".format(config.variant_suffix[1:]))
77+
7678
if "@SWIFT_ASAN_BUILD@" == "TRUE":
7779
config.available_features.add("asan")
7880
else:

0 commit comments

Comments
 (0)