1# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s 2# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s --check-prefix=WARNING 3# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -version_load_command && llvm-objdump --private-headers %t | FileCheck %s 4# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_version_load_command && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN 5# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -version_load_command -no_version_load_command && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN 6# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN 7 8# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -sdk_version 10.9 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=SDK_VERSION 9 10--- !mach-o 11arch: x86_64 12file-type: MH_OBJECT 13flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ] 14sections: 15 - segment: __TEXT 16 section: __text 17 type: S_REGULAR 18 attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ] 19 address: 0x0000000000000000 20 content: [ 0x00, 0x00, 0x00, 0x00 ] 21global-symbols: 22 - name: _main 23 type: N_SECT 24 scope: [ N_EXT ] 25 sect: 1 26 value: 0x0000000000000000 27... 28 29# CHECK: Load command {{[0-9]*}} 30# CHECK: cmd LC_VERSION_MIN_MACOSX 31# CHECK: cmdsize 16 32# CHECK: version 10.8 33# CHECK: sdk 10.8 34 35# SDK_VERSION: Load command {{[0-9]*}} 36# SDK_VERSION: cmd LC_VERSION_MIN_MACOSX 37# SDK_VERSION: cmdsize 16 38# SDK_VERSION: version 10.8 39# SDK_VERSION: sdk 10.9 40 41# WARNING: warning: -sdk_version is required when emitting min version load command. Setting sdk version to match provided min version 42 43# NO_VERSION_MIN-NOT: LC_VERSION_MIN_MACOSX 44