Skip to content

Commit a35db85

Browse files
committed
[embedded] Build the macOS Embedded Stdlib with a recent deployment target
1 parent 9f067c1 commit a35db85

File tree

7 files changed

+20
-8
lines changed

7 files changed

+20
-8
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
227227
)
228228
elseif (SWIFT_HOST_VARIANT STREQUAL "macosx")
229229
set(EMBEDDED_STDLIB_TARGET_TRIPLES ${EMBEDDED_STDLIB_TARGET_TRIPLES}
230-
"x86_64 x86_64-apple-macos x86_64-apple-macos10.13"
231-
"arm64 arm64-apple-macos arm64-apple-macos10.13"
232-
"arm64e arm64e-apple-macos arm64e-apple-macos10.13"
230+
"x86_64 x86_64-apple-macos x86_64-apple-macos14"
231+
"arm64 arm64-apple-macos arm64-apple-macos14"
232+
"arm64e arm64e-apple-macos arm64e-apple-macos14"
233233
)
234234
endif()
235235
endif()

test/embedded/concurrency-actors.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 %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
2+
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
33
// RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
44
// RUN: %target-clang %t/a.o %t/print.o -o %t/a.out %swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos/libswift_Concurrency.a -dead_strip
55
// RUN: %target-run %t/a.out | %FileCheck %s

test/embedded/concurrency-async-let.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 %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
2+
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
33
// RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
44
// RUN: %target-clang %t/a.o %t/print.o -o %t/a.out %swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos/libswift_Concurrency.a -dead_strip
55
// RUN: %target-run %t/a.out | %FileCheck %s

test/embedded/concurrency-builtins.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 %target-cpu-apple-macos14 -emit-irgen %s -enable-experimental-feature Embedded -enable-builtin-module | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-irgen %s -enable-experimental-feature Embedded -enable-builtin-module | %FileCheck %s
22

33
// REQUIRES: swift_in_compiler
44
// REQUIRES: optimized_stdlib

test/embedded/concurrency-simple.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 %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
2+
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
33
// RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
44
// RUN: %target-clang %t/a.o %t/print.o -o %t/a.out %swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos/libswift_Concurrency.a -dead_strip
55
// RUN: %target-run %t/a.out | %FileCheck %s

test/embedded/lit.local.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Make a local copy of the substitutions.
2+
config.substitutions = list(config.substitutions)
3+
4+
if config.target_sdk_name == 'macosx':
5+
def do_fixup(key, value):
6+
if isinstance(value, str):
7+
value = value.replace("-apple-macosx10.13", "-apple-macos14")
8+
elif isinstance(value, SubstituteCaptures):
9+
value.substitution = value.substitution.replace("-apple-macosx10.13", "-apple-macos14")
10+
return (key, value)
11+
12+
config.substitutions = [do_fixup(a, b) for (a, b) in config.substitutions]

test/embedded/opaque-return-types.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-ir %s -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded | %FileCheck %s
1+
// RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s
22

33
// REQUIRES: swift_in_compiler
44
// REQUIRES: VENDOR=apple

0 commit comments

Comments
 (0)