1// RUN: llvm-mc -triple x86_64-apple-macosx10.10.0 %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s 2// 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 3// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-DARWIN 4// 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 5 6// RUN: llvm-mc -triple x86_64-apple-macos10.14 %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-MACOS 7// RUN: llvm-mc -triple x86_64-apple-ios12 %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-IOS 8// RUN: llvm-mc -triple x86_64-apple-tvos12 %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-TVOS 9// RUN: llvm-mc -triple x86_64-apple-watchos5 %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-WATCHOS 10// RUN: llvm-mc -triple x86_64-apple-ios12-simulator %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-IOSSIM 11// RUN: llvm-mc -triple x86_64-apple-tvos12-simulator %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-TVOSSIM 12// RUN: llvm-mc -triple x86_64-apple-watchos5-simulator %s -filetype=obj -o - | llvm-objdump --macho --private-headers - | FileCheck %s --check-prefix=CHECK-BUILD-WATCHOSSIM 13 14// Test version-min load command should be inferred from triple and should always be generated on Darwin 15// CHECK: Load command 16// CHECK: cmd LC_VERSION_MIN_MACOSX 17// CHECK: cmdsize 16 18// CHECK: version 10.10 19 20// CHECK-IOS: Load command 21// CHECK-IOS: cmd LC_VERSION_MIN_IPHONEOS 22// CHECK-IOS: cmdsize 16 23// CHECK-IOS: version 8.0 24 25// CHECK-DARWIN-NOT: LC_VERSION_MIN 26 27 28// 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 29// 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 30// CHECK-WATCHOS: Load command 31// CHECK-WATCHOS: cmd LC_VERSION_MIN_WATCHOS 32// CHECK-WATCHOS-NEXT: cmdsize 16 33// CHECK-WATCHOS-NEXT: version 1.0 34 35// CHECK-TVOS: cmd LC_VERSION_MIN_TVOS 36// CHECK-TVOS-NEXT: cmdsize 16 37// CHECK-TVOS-NEXT: version 8.0 38 39// CHECK-BRIDGEOS: cmd LC_BUILD_VERSION 40// CHECK-BRIDGEOS-NEXT: cmdsize 24 41// CHECK-BRIDGEOS-NEXT: platform bridgeos 42// CHECK-BRIDGEOS-NEXT: sdk n/a 43// CHECK-BRIDGEOS-NEXT: minos 2.0 44// CHECK-BRIDGEOS-NEXT: ntools 0 45 46// CHECK-MACCATALYST: cmd LC_BUILD_VERSION 47// CHECK-MACCATALYST-NEXT: cmdsize 24 48// CHECK-MACCATALYST-NEXT: platform macCatalyst 49// CHECK-MACCATALYST-NEXT: sdk n/a 50// CHECK-MACCATALYST-NEXT: minos 13.0 51// CHECK-MACCATALYST-NEXT: ntools 0 52 53// CHECK-BUILD-MACOS: cmd LC_BUILD_VERSION 54// CHECK-BUILD-MACOS-NEXT: cmdsize 24 55// CHECK-BUILD-MACOS-NEXT: platform macos 56// CHECK-BUILD-MACOS-NEXT: sdk n/a 57// CHECK-BUILD-MACOS-NEXT: minos 10.14 58// CHECK-BUILD-MACOS-NEXT: ntools 0 59// CHECK-BUILD-MACOS-NOT: LC_VERSION_MIN 60 61// CHECK-BUILD-IOS: cmd LC_BUILD_VERSION 62// CHECK-BUILD-IOS-NEXT: cmdsize 24 63// CHECK-BUILD-IOS-NEXT: platform ios 64// CHECK-BUILD-IOS-NEXT: sdk n/a 65// CHECK-BUILD-IOS-NEXT: minos 12.0 66// CHECK-BUILD-IOS-NEXT: ntools 0 67// CHECK-BUILD-IOS-NOT: LC_VERSION_MIN 68 69// CHECK-BUILD-TVOS: cmd LC_BUILD_VERSION 70// CHECK-BUILD-TVOS-NEXT: cmdsize 24 71// CHECK-BUILD-TVOS-NEXT: platform tvos 72// CHECK-BUILD-TVOS-NEXT: sdk n/a 73// CHECK-BUILD-TVOS-NEXT: minos 12.0 74// CHECK-BUILD-TVOS-NEXT: ntools 0 75// CHECK-BUILD-TVOS-NOT: LC_VERSION_MIN 76 77// CHECK-BUILD-WATCHOS: cmd LC_BUILD_VERSION 78// CHECK-BUILD-WATCHOS-NEXT: cmdsize 24 79// CHECK-BUILD-WATCHOS-NEXT: platform watchos 80// CHECK-BUILD-WATCHOS-NEXT: sdk n/a 81// CHECK-BUILD-WATCHOS-NEXT: minos 5.0 82// CHECK-BUILD-WATCHOS-NEXT: ntools 0 83// CHECK-BUILD-WATCHOS-NOT: LC_VERSION_MIN 84 85// CHECK-BUILD-IOSSIM: cmd LC_BUILD_VERSION 86// CHECK-BUILD-IOSSIM-NEXT: cmdsize 24 87// CHECK-BUILD-IOSSIM-NEXT: platform iossim 88// CHECK-BUILD-IOSSIM-NEXT: sdk n/a 89// CHECK-BUILD-IOSSIM-NEXT: minos 12.0 90// CHECK-BUILD-IOSSIM-NEXT: ntools 0 91// CHECK-BUILD-IOSSIM-NOT: LC_VERSION_MIN 92 93// CHECK-BUILD-TVOSSIM: cmd LC_BUILD_VERSION 94// CHECK-BUILD-TVOSSIM-NEXT: cmdsize 24 95// CHECK-BUILD-TVOSSIM-NEXT: platform tvossim 96// CHECK-BUILD-TVOSSIM-NEXT: sdk n/a 97// CHECK-BUILD-TVOSSIM-NEXT: minos 12.0 98// CHECK-BUILD-TVOSSIM-NEXT: ntools 0 99// CHECK-BUILD-TVOSSIM-NOT: LC_VERSION_MIN 100 101// CHECK-BUILD-WATCHOSSIM: cmd LC_BUILD_VERSION 102// CHECK-BUILD-WATCHOSSIM-NEXT: cmdsize 24 103// CHECK-BUILD-WATCHOSSIM-NEXT: platform watchossim 104// CHECK-BUILD-WATCHOSSIM-NEXT: sdk n/a 105// CHECK-BUILD-WATCHOSSIM-NEXT: minos 5.0 106// CHECK-BUILD-WATCHOSSIM-NEXT: ntools 0 107// CHECK-BUILD-WATCHOSSIM-NOT: LC_VERSION_MIN 108 109