1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/MC/MachO/osx-version-min-load-command-with-sdk.s
Alex Lorenz 6f0d069409 [macho] save the SDK version stored in module metadata into the version min and
build version load commands in the object file

This commit introduces a new metadata node called "SDK Version". It will be set
by the frontend to mark the platform SDK (macOS/iOS/etc) version which was used
during that particular compilation.
This node is used when machine code is emitted, by either saving the SDK version
into the appropriate macho load command (version min/build version), or by
emitting the assembly for these load commands with the SDK version specified as
well.
The assembly for both load commands is extended by allowing it to contain the
sdk_version X, Y [, Z] trailing directive to represent the SDK version
respectively.

rdar://45774000

Differential Revision: https://reviews.llvm.org/D55612

llvm-svn: 349119
2018-12-14 01:14:10 +00:00

13 lines
406 B
ArmAsm

// RUN: llvm-mc -triple x86_64-apple-macos %s -filetype=obj -o - | llvm-readobj --macho-version-min | FileCheck %s
// Test the formation of the sdk_version component of the version load
// command in the MachO.
.macosx_version_min 10,13,2 sdk_version 10,14
// CHECK: MinVersion {
// CHECK: Cmd: LC_VERSION_MIN_MACOSX
// CHECK: Size: 16
// CHECK: Version: 10.13.2
// CHECK: SDK: 10.14
// CHECK: }