mirror of
https://github.com/apple/swift.git
synced 2026-10-10 13:50:43 +02:00
`%target-embedded-link` now bundles `libswiftCore.a` (and `libswiftEmbeddedPlatformPOSIX.a` when available), so RUN lines that spell out `%target-embedded-posix-shim` or `%embedded-stdlib` alongside it are redundant. Also switch `concurrency-dynamic-isolation-link.swift` from raw `%target-clang` to `%target-embedded-link` so it picks up the stdlib archive through the same substitution.
26 lines
676 B
Swift
26 lines
676 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend %s -target %target-cpu-apple-ios99-macabi -parse-as-library -enable-experimental-feature Embedded -c -o %t/main.o
|
|
// RUN: %target-embedded-link -target %target-cpu-apple-ios99-macabi %t/main.o -o %t/a.out -dead_strip
|
|
// RUN: %target-codesign %t/a.out
|
|
// RUN: %target-run %t/a.out | %FileCheck %s
|
|
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: optimized_stdlib
|
|
// REQUIRES: VENDOR=apple
|
|
// REQUIRES: OS=macosx
|
|
// REQUIRES: maccatalyst_support
|
|
// REQUIRES: swift_feature_Embedded
|
|
|
|
import Darwin
|
|
|
|
@main
|
|
struct Main {
|
|
static func main() {
|
|
let x = getuid()
|
|
print("User id: ")
|
|
print(x)
|
|
}
|
|
}
|
|
|
|
// CHECK: User id:
|