Files
swift-mirror/test/Concurrency/Backdeploy/linking.swift
Ian Anderson 9e9d66efc9 [overlay] Support the older @rpath Darwin library for _Builtin_float's $ld$previous$ symbols
The _Builtin_float symbols were moved twice, most recently from the OS Darwin library, but previously they were in the embedded @rpath Darwin library. @_originallyDefinedIn doesn't support multiple install names, but it can be replaced with -module-abi-name, and then multiple $ld$previous$ symbols can be used.
Update the Platform and Concurrency magic symbols to use $ld$previous$ everywhere.

rdar://130107191
2024-07-09 09:13:30 -07:00

22 lines
841 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift -target %target-cpu-apple-macosx12 %s -o %t/linking_direct
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/linking_rpath
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.15 %s -o %t/linking_rpath_old
// RUN: otool -L %t/linking_direct | %FileCheck -check-prefix CHECK-DIRECT %s
// RUN: otool -L %t/linking_rpath | %FileCheck -check-prefix CHECK-RPATH %s
// RUN: otool -L %t/linking_rpath_old | %FileCheck -check-prefix CHECK-RPATH %s
// REQUIRES: OS=macosx
// CHECK-DIRECT: /usr/lib/swift/libswift_Concurrency.dylib
// CHECK-RPATH: @rpath/libswift_Concurrency.dylib
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct X {
public func f() async -> Int { return 0 }
public func g() async -> Int {
await f()
}
}