Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stdlib/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
)
elseif (SWIFT_HOST_VARIANT STREQUAL "macosx")
set(EMBEDDED_STDLIB_TARGET_TRIPLES ${EMBEDDED_STDLIB_TARGET_TRIPLES}
"x86_64 x86_64-apple-macos x86_64-apple-macos10.13"
"arm64 arm64-apple-macos arm64-apple-macos10.13"
"arm64e arm64e-apple-macos arm64e-apple-macos10.13"
"x86_64 x86_64-apple-macos x86_64-apple-macos14"
"arm64 arm64-apple-macos arm64-apple-macos14"
"arm64e arm64e-apple-macos arm64e-apple-macos14"
)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion test/DebugInfo/embedded.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Check that the "-enable-embedded-swift" is stored as a flag in the
// Compile Unit.

// RUN: %target-swift-frontend -emit-ir -enable-experimental-feature Embedded -g %s -o - | %FileCheck %s
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -emit-ir -enable-experimental-feature Embedded -g %s -o - | %FileCheck %s

// REQUIRES: swift_in_compiler
// REQUIRES: executable_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: asserts
// REQUIRES: swift_in_compiler
// REQUIRES: OS=macosx || OS=linux-gnu
// REQUIRES: OS=linux-gnu
// RUN: %batch-code-completion -enable-experimental-feature Embedded

func test() {
Expand Down
15 changes: 15 additions & 0 deletions test/IDE/complete_embedded_macos.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// REQUIRES: asserts
// REQUIRES: swift_in_compiler
// REQUIRES: OS=macosx
// RUN: %batch-code-completion -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded

func test() {
#^GLOBAL^#
// GLOBAL: Literal[Integer]/None: 0[#Int#];
// GLOBAL: Literal[Boolean]/None: true[#Bool#];
// GLOBAL: Literal[Boolean]/None: false[#Bool#];
// GLOBAL: Literal[Nil]/None: nil;
// GLOBAL: Literal[String]/None: "{#(abc)#}"[#String#];
// GLOBAL: Literal[Array]/None: [{#(values)#}][#Array#];
// GLOBAL: Literal[Dictionary]/None: [{#(key)#}: {#(value)#}][#Dictionary#];
}
8 changes: 4 additions & 4 deletions test/SILOptimizer/devirt_deinits.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// RUN: %target-swift-frontend -primary-file %s -parse-as-library -sil-verify-all -Xllvm -enable-deinit-devirtualizer -module-name=test -emit-sil | %FileCheck %s
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -primary-file %s -parse-as-library -sil-verify-all -Xllvm -enable-deinit-devirtualizer -module-name=test -emit-sil | %FileCheck %s

// Also do an end-to-end test and check if the compiled executable works as expected.
// RUN: %target-run-simple-swift(-Xllvm -enable-deinit-devirtualizer -parse-as-library) | %FileCheck -check-prefix CHECK-OUTPUT %s
// RUN: %target-run-simple-swift(-target %target-cpu-apple-macos14 -Xllvm -enable-deinit-devirtualizer -parse-as-library) | %FileCheck -check-prefix CHECK-OUTPUT %s

// Check if it works in embedded mode.
// RUN: %target-run-simple-swift(-enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck -check-prefix CHECK-OUTPUT %s
// RUN: %target-run-simple-swift(-target %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck -check-prefix CHECK-OUTPUT %s

// Run without the deinit-devirtualizer to verify that our CHECK-OUTPUT lines are correct.
// TODO: currently disabled because of rdar://118449507
// RUNx: %target-run-simple-swift(-Xllvm -sil-disable-pass=deinit-devirtualizer -parse-as-library) | %FileCheck -check-prefix CHECK-OUTPUT %s
// RUNx: %target-run-simple-swift(-target %target-cpu-apple-macos14 -Xllvm -sil-disable-pass=deinit-devirtualizer -parse-as-library) | %FileCheck -check-prefix CHECK-OUTPUT %s


// REQUIRES: swift_in_compiler
Expand Down
2 changes: 1 addition & 1 deletion test/embedded/concurrency-actors.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
// RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
// 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
// RUN: %target-run %t/a.out | %FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion test/embedded/concurrency-async-let.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
// RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
// 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
// RUN: %target-run %t/a.out | %FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion test/embedded/concurrency-builtins.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -emit-irgen %s -enable-experimental-feature Embedded -enable-builtin-module | %FileCheck %s
// RUN: %target-swift-frontend -emit-irgen %s -enable-experimental-feature Embedded -enable-builtin-module | %FileCheck %s

// REQUIRES: swift_in_compiler
// REQUIRES: optimized_stdlib
Expand Down
2 changes: 1 addition & 1 deletion test/embedded/concurrency-simple.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
// RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
// 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
// RUN: %target-run %t/a.out | %FileCheck %s
Expand Down
12 changes: 12 additions & 0 deletions test/embedded/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Make a local copy of the substitutions.
config.substitutions = list(config.substitutions)

if config.target_sdk_name == 'macosx':
def do_fixup(key, value):
if isinstance(value, str):
value = value.replace("-apple-macosx10.13", "-apple-macos14")
elif isinstance(value, SubstituteCaptures):
value.substitution = value.substitution.replace("-apple-macosx10.13", "-apple-macos14")
return (key, value)

config.substitutions = [do_fixup(a, b) for (a, b) in config.substitutions]
2 changes: 1 addition & 1 deletion test/embedded/opaque-return-types.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-emit-ir %s -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded | %FileCheck %s
// RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s

// REQUIRES: swift_in_compiler
// REQUIRES: VENDOR=apple
Expand Down