Files
swift-mirror/test/embedded/darwin.swift
2024-01-13 21:35:36 +01:00

24 lines
558 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %s -parse-as-library -enable-experimental-feature Embedded -throws-as-traps -enable-builtin-module -c -o %t/main.o
// RUN: %target-clang %t/main.o -o %t/a.out -dead_strip
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: swift_in_compiler
// REQUIRES: executable_test
// REQUIRES: optimized_stdlib
// REQUIRES: VENDOR=apple
// REQUIRES: OS=macosx
import Darwin
@main
struct Main {
static func main() {
let x = getuid()
print("User id: ")
print(x)
}
}
// CHECK: User id: