diff --git a/lld/MachO/Options.td b/lld/MachO/Options.td --- a/lld/MachO/Options.td +++ b/lld/MachO/Options.td @@ -188,6 +188,10 @@ MetaVarName<" ">, HelpText<"Platform (e.g., macos, ios, tvos, watchos, bridgeos, mac-catalyst, ios-sim, tvos-sim, watchos-sim, driverkit) and version numbers">, Group; +def sdk_version : Separate<["-"], "sdk_version">, + HelpText<"This option is undocumented in ld64">, + Flags<[HelpHidden]>, + Group; def macos_version_min : Separate<["-"], "macos_version_min">, MetaVarName<"">, HelpText<"Oldest macOS version for which linked output is useable">, @@ -204,6 +208,11 @@ HelpText<"Oldest iOS version for which linked output is useable">, Flags<[HelpHidden]>, Group; +def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">, + MetaVarName<"">, + HelpText<"Oldest iOS simulator version for which linked output is useable">, + Flags<[HelpHidden]>, + Group; def iphoneos_version_min : Separate<["-"], "iphoneos_version_min">, MetaVarName<"">, Alias, @@ -1212,7 +1221,7 @@ HelpText<"This option is undocumented in ld64">, Flags<[HelpHidden]>, Group; -def objc_abi_version : Flag<["-"], "objc_abi_version">, +def objc_abi_version : Separate<["-"], "objc_abi_version">, HelpText<"This option is undocumented in ld64">, Flags<[HelpHidden]>, Group; @@ -1228,10 +1237,6 @@ HelpText<"This option is undocumented in ld64">, Flags<[HelpHidden]>, Group; -def sdk_version : Flag<["-"], "sdk_version">, - HelpText<"This option is undocumented in ld64">, - Flags<[HelpHidden]>, - Group; def simulator_support : Flag<["-"], "simulator_support">, HelpText<"This option is undocumented in ld64">, Flags<[HelpHidden]>, diff --git a/lld/test/MachO/silent-ignore.test b/lld/test/MachO/silent-ignore.test --- a/lld/test/MachO/silent-ignore.test +++ b/lld/test/MachO/silent-ignore.test @@ -5,6 +5,9 @@ RUN: -lto_library /lib/foo \ RUN: -macosx_version_min 0 \ RUN: -dependency_info /path/to/dependency_info.dat \ -RUN: -mllvm -time-passes +RUN: -mllvm -time-passes \ +RUN: -objc_abi_version 2 \ +RUN: -ios_simulator_version_min 9.0.0 \ +RUN: -sdk_version 13.2 RUN: not %lld -v --not-an-ignored-argument 2>&1 | FileCheck %s CHECK: error: unknown argument: --not-an-ignored-argument