+ // Write out the deployment target information, if it's available.
+ if (VersionInfo.Major != 0) {
+ assert(VersionInfo.Update < 256 && "unencodable update target version");
+ assert(VersionInfo.Minor < 256 && "unencodable minor target version");
+ assert(VersionInfo.Major < 65536 && "unencodable major target version");
+ uint32_t EncodedVersion = VersionInfo.Update | (VersionInfo.Minor << 8) |
+ (VersionInfo.Major << 16);
+ Write32(VersionInfo.Kind == MCVM_OSXVersionMin ? MachO::LC_VERSION_MIN_MACOSX :
+ MachO::LC_VERSION_MIN_IPHONEOS);
+ Write32(sizeof(MachO::version_min_command));
+ Write32(EncodedVersion);
+ Write32(0); // reserved.
+ }
+