3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
5 # RUN: %lld -platform_version macos 10.14 10.15 -o %t.macos-10-14 %t.o
6 # RUN: llvm-objdump --macho --all-headers %t.macos-10-14 | FileCheck %s --check-prefix=MACOS-10-14
8 # MACOS-10-14: cmd LC_BUILD_VERSION
9 # MACOS-10-14-NEXT: cmdsize 32
10 # MACOS-10-14-NEXT: platform macos
11 # MACOS-10-14-NEXT: sdk 10.15
12 # MACOS-10-14-NEXT: minos 10.14
13 # MACOS-10-14-NEXT: ntools 1
14 # MACOS-10-14-NEXT: tool lld
15 # MACOS-10-14-NEXT: version {{[0-9\.]+}}
17 # RUN: %lld -platform_version macos 10.13 10.15 -o %t.macos-10-13 %t.o
18 # RUN: llvm-objdump --macho --all-headers %t.macos-10-13 | FileCheck %s --check-prefix=MACOS-10-13
20 # MACOS-10-13: cmd LC_VERSION_MIN_MACOSX
21 # MACOS-10-13-NEXT: cmdsize 16
22 # MACOS-10-13-NEXT: version 10.13
23 # MACOS-10-13-NEXT: sdk 10.15
25 # RUN: %no-arg-lld -arch x86_64 -platform_version ios 12.0 10.15 -o %t.ios-12-0 %t.o
26 # RUN: llvm-objdump --macho --all-headers %t.ios-12-0 | FileCheck %s --check-prefix=IOS-12-0
27 # RUN: %no-arg-lld -arch x86_64 -platform_version ios-simulator 13.0 10.15 -o %t.ios-sim-13-0 %t.o
28 # RUN: llvm-objdump --macho --all-headers %t.ios-sim-13-0 | FileCheck %s --check-prefix=IOS-12-0
30 # IOS-12-0: cmd LC_BUILD_VERSION
32 # RUN: %no-arg-lld -arch x86_64 -platform_version ios 11.0 10.15 -o %t.ios-11-0 %t.o
33 # RUN: llvm-objdump --macho --all-headers %t.ios-11-0 | FileCheck %s --check-prefix=IOS-11-0
34 # RUN: %no-arg-lld -arch x86_64 -platform_version ios-simulator 12.0 10.15 -o %t.ios-sim-12-0 %t.o
35 # RUN: llvm-objdump --macho --all-headers %t.ios-sim-12-0 | FileCheck %s --check-prefix=IOS-11-0
37 # IOS-11-0: cmd LC_VERSION_MIN_IPHONEOS
39 # RUN: %no-arg-lld -arch x86_64 -platform_version tvos 12.0 10.15 -o %t.tvos-12-0 %t.o
40 # RUN: llvm-objdump --macho --all-headers %t.tvos-12-0 | FileCheck %s --check-prefix=TVOS-12-0
41 # RUN: %no-arg-lld -arch x86_64 -platform_version tvos-simulator 13.0 10.15 -o %t.tvos-sim-13-0 %t.o
42 # RUN: llvm-objdump --macho --all-headers %t.tvos-sim-13-0 | FileCheck %s --check-prefix=TVOS-12-0
44 # TVOS-12-0: cmd LC_BUILD_VERSION
46 # RUN: %no-arg-lld -arch x86_64 -platform_version tvos 11.0 10.15 -o %t.tvos-11-0 %t.o
47 # RUN: llvm-objdump --macho --all-headers %t.tvos-11-0 | FileCheck %s --check-prefix=TVOS-11-0
48 # RUN: %no-arg-lld -arch x86_64 -platform_version tvos-simulator 12.0 10.15 -o %t.tvos-sim-12-0 %t.o
49 # RUN: llvm-objdump --macho --all-headers %t.tvos-sim-12-0 | FileCheck %s --check-prefix=TVOS-11-0
51 # TVOS-11-0: cmd LC_VERSION_MIN_TVOS
53 # RUN: %no-arg-lld -arch x86_64 -platform_version watchos 5.0 10.15 -o %t.watchos-5-0 %t.o
54 # RUN: llvm-objdump --macho --all-headers %t.watchos-5-0 | FileCheck %s --check-prefix=WATCHOS-5-0
55 # RUN: %no-arg-lld -arch x86_64 -platform_version watchos-simulator 6.0 10.15 -o %t.watchos-sim-6-0 %t.o
56 # RUN: llvm-objdump --macho --all-headers %t.watchos-sim-6-0 | FileCheck %s --check-prefix=WATCHOS-5-0
58 # WATCHOS-5-0: cmd LC_BUILD_VERSION
60 # RUN: %no-arg-lld -arch x86_64 -platform_version watchos 4.0 10.15 -o %t.watchos-4-0 %t.o
61 # RUN: llvm-objdump --macho --all-headers %t.watchos-4-0 | FileCheck %s --check-prefix=WATCHOS-4-0
62 # RUN: %no-arg-lld -arch x86_64 -platform_version watchos-simulator 5.0 10.15 -o %t.watchos-sim-5-0 %t.o
63 # RUN: llvm-objdump --macho --all-headers %t.watchos-sim-5-0 | FileCheck %s --check-prefix=WATCHOS-4-0
65 # WATCHOS-4-0: cmd LC_VERSION_MIN_WATCHOS
67 # RUN: %no-arg-lld -arch x86_64 -platform_version xros 1.0 1.1 -o %t.xros-1-0 %t.o
68 # RUN: llvm-objdump --macho --all-headers %t.xros-1-0 | FileCheck %s --check-prefix=XROS-1-0
69 # RUN: %no-arg-lld -arch x86_64 -platform_version xros-simulator 1.0 1.1 -o %t.xros-sim-1-0 %t.o
70 # RUN: llvm-objdump --macho --all-headers %t.xros-sim-1-0 | FileCheck %s --check-prefix=XROS-1-0
72 # XROS-1-0: cmd LC_BUILD_VERSION