darwin-version-min-load-command.s
2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// RUN: llvm-mc -triple x86_64-apple-macosx10.10.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s
// RUN: llvm-mc -triple x86_64-apple-ios8.0.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-IOS
// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-DARWIN
// RUN: llvm-mc -triple x86_64-apple-ios13.0-macabi %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-MACCATALYST
// Test version-min load command should be inferred from triple and should always be generated on Darwin
// CHECK: Load command
// CHECK: cmd LC_VERSION_MIN_MACOSX
// CHECK: cmdsize 16
// CHECK: version 10.10
// CHECK-IOS: Load command
// CHECK-IOS: cmd LC_VERSION_MIN_IPHONEOS
// CHECK-IOS: cmdsize 16
// CHECK-IOS: version 8.0
// CHECK-DARWIN-NOT: LC_VERSION_MIN
// RUN: llvm-mc -triple x86_64-apple-watchos1.0.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-WATCHOS
// RUN: llvm-mc -triple x86_64-apple-tvos8.0.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-TVOS
// CHECK-WATCHOS: Load command
// CHECK-WATCHOS: cmd LC_VERSION_MIN_WATCHOS
// CHECK-WATCHOS-NEXT: cmdsize 16
// CHECK-WATCHOS-NEXT: version 1.0
// CHECK-TVOS: cmd LC_VERSION_MIN_TVOS
// CHECK-TVOS-NEXT: cmdsize 16
// CHECK-TVOS-NEXT: version 8.0
// CHECK-BRIDGEOS: cmd LC_BUILD_VERSION
// CHECK-BRIDGEOS-NEXT: cmdsize 24
// CHECK-BRIDGEOS-NEXT: platform bridgeos
// CHECK-BRIDGEOS-NEXT: sdk n/a
// CHECK-BRIDGEOS-NEXT: minos 2.0
// CHECK-BRIDGEOS-NEXT: ntools 0
// CHECK-MACCATALYST: cmd LC_BUILD_VERSION
// CHECK-MACCATALYST-NEXT: cmdsize 24
// CHECK-MACCATALYST-NEXT: platform macCatalyst
// CHECK-MACCATALYST-NEXT: sdk n/a
// CHECK-MACCATALYST-NEXT: minos 13.0
// CHECK-MACCATALYST-NEXT: ntools 0