mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Before this change, we were sometimes using introductory platform version as the starting version where a symbol is considered belonging to the original binary. However, this is insufficient because backdeploying to a platform version prior to a symbol's introductory version can happen. When it happens, we should expect the moved symbol to be found in the moved-from library, not the moved-to one. Expecting the symbol to be found in the moved-to library can lead to crasher. Resolves: rdar://159408187
37 lines
3.9 KiB
Swift
37 lines
3.9 KiB
Swift
// REQUIRES: OS=macosx
|
|
|
|
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -typecheck %S/Inputs/linker-directive.swift -tbd-is-installapi -emit-tbd -emit-tbd-path %t/linker_directives_installapi.tbd -previous-module-installname-map-file %S/Inputs/install-name-map-toasterkit.json -tbd-install_name toasterkit
|
|
// RUN: %llvm-nm %t/linker_directives_installapi.tbd | %FileCheck %s --check-prefixes=CHECK,CHECK-MAC --implicit-check-not "System/Previous/macCatalyst"
|
|
// RUN: %target-swift-frontend -typecheck %S/Inputs/linker-directive.swift -emit-tbd -emit-tbd-path %t/linker_directives_macos.tbd -previous-module-installname-map-file %S/Inputs/install-name-map-toasterkit.json -tbd-install_name toasterkit
|
|
// RUN: %llvm-nm %t/linker_directives_macos.tbd | %FileCheck %s --check-prefixes=CHECK,CHECK-MAC --implicit-check-not "System/Previous/macCatalyst"
|
|
|
|
// RUN: %target-swift-frontend -target-variant x86_64-apple-ios13.1-macabi -typecheck %S/Inputs/linker-directive.swift -emit-tbd -emit-tbd-path %t/linker_directives_macos_macabi.tbd -previous-module-installname-map-file %S/Inputs/install-name-map-toasterkit.json -tbd-install_name toasterkit
|
|
// RUN: %llvm-nm %t/linker_directives_macos_macabi.tbd | %FileCheck -check-prefixes=CHECK,CHECK-MAC,CHECK-MACCATALYST %s
|
|
|
|
// RUN: %target-swift-frontend -target x86_64-apple-ios13.1-macabi -typecheck %S/Inputs/linker-directive.swift -emit-tbd -emit-tbd-path %t/linker_directives_macabi.tbd -previous-module-installname-map-file %S/Inputs/install-name-map-toasterkit.json -tbd-install_name toasterkit
|
|
// R/UN: %llvm-nm %t/linker_directives_macabi.tbd | %FileCheck -check-prefixes=CHECK,CHECK-MACCATALYST %s --implicit-check-not "System/Previous/macOS"
|
|
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$13.0$_$s10ToasterKit5toastyyF$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$13.0$_$s10ToasterKit7VehicleV4moveyyF$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$13.0$_$s10ToasterKit7VehicleVMa$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$13.0$_$s10ToasterKit7VehicleVMn$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$13.0$_$s10ToasterKit7VehicleVN$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$18.0$_$s10ToasterKit14movedPriorTo26yyF
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$26.0$_$s10ToasterKit16movedInVersion26yyF$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$26.0$_$s10ToasterKit26movedInVersionsMappingTo26yyF$
|
|
// CHECK-MACCATALYST: D $ld$previous$/System/Previous/macCatalyst/ToasterKit.dylib$$6$1.0$27.0$_$s10ToasterKit26movedInVersionsMappingTo27yyF$
|
|
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$10.15$_$s10ToasterKit5toastyyF$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$10.15$_$s10ToasterKit7VehicleV4moveyyF$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$10.15$_$s10ToasterKit7VehicleVMa$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$10.15$_$s10ToasterKit7VehicleVMn$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$10.15$_$s10ToasterKit7VehicleVN$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$15.0$_$s10ToasterKit14movedPriorTo26yyF$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$26.0$_$s10ToasterKit16movedInVersion26yyF$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$26.0$_$s10ToasterKit26movedInVersionsMappingTo26yyF$
|
|
// CHECK-MAC: D $ld$previous$/System/Previous/macOS/ToasterKit.dylib$$1$1.0$27.0$_$s10ToasterKit26movedInVersionsMappingTo27yyF$
|
|
|
|
// CHECK-NOT: $_$s10ToasterKit7VehicleV32originallyDefinedInCurrentModuleyyF
|