diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -3354,10 +3354,10 @@ def ffuchsia_api_level_EQ : Joined<["-"], "ffuchsia-api-level=">, Group, Flags<[CC1Option]>, HelpText<"Set Fuchsia API level">, MarshallingInfoInt>; -def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">, - Group, HelpText<"Set Mac OS X deployment target">; def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">, - Group, Alias; + Group, HelpText<"Set macOS deployment target">; +def : Joined<["-"], "mmacosx-version-min=">, + Group, Alias; def mms_bitfields : Flag<["-"], "mms-bitfields">, Group, Flags<[CC1Option]>, HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">, MarshallingInfoFlag>; diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp @@ -1551,7 +1551,7 @@ options::ID Opt; switch (Platform) { case DarwinPlatformKind::MacOS: - Opt = options::OPT_mmacosx_version_min_EQ; + Opt = options::OPT_mmacos_version_min_EQ; break; case DarwinPlatformKind::IPhoneOS: Opt = options::OPT_miphoneos_version_min_EQ; @@ -1727,7 +1727,7 @@ Optional getDeploymentTargetFromOSVersionArg(DerivedArgList &Args, const Driver &TheDriver) { - Arg *OSXVersion = Args.getLastArg(options::OPT_mmacosx_version_min_EQ); + Arg *macOSVersion = Args.getLastArg(options::OPT_mmacos_version_min_EQ); Arg *iOSVersion = Args.getLastArg(options::OPT_miphoneos_version_min_EQ, options::OPT_mios_simulator_version_min_EQ); Arg *TvOSVersion = @@ -1736,15 +1736,15 @@ Arg *WatchOSVersion = Args.getLastArg(options::OPT_mwatchos_version_min_EQ, options::OPT_mwatchos_simulator_version_min_EQ); - if (OSXVersion) { + if (macOSVersion) { if (iOSVersion || TvOSVersion || WatchOSVersion) { TheDriver.Diag(diag::err_drv_argument_not_allowed_with) - << OSXVersion->getAsString(Args) + << macOSVersion->getAsString(Args) << (iOSVersion ? iOSVersion : TvOSVersion ? TvOSVersion : WatchOSVersion) ->getAsString(Args); } - return DarwinPlatform::createOSVersionArg(Darwin::MacOS, OSXVersion); + return DarwinPlatform::createOSVersionArg(Darwin::MacOS, macOSVersion); } else if (iOSVersion) { if (TvOSVersion || WatchOSVersion) { TheDriver.Diag(diag::err_drv_argument_not_allowed_with) diff --git a/clang/test/Driver/darwin-debug-flags.c b/clang/test/Driver/darwin-debug-flags.c --- a/clang/test/Driver/darwin-debug-flags.c +++ b/clang/test/Driver/darwin-debug-flags.c @@ -9,7 +9,7 @@ // CHECK-SAME: flags: // CHECK-SAME: -I path\\ with\\ \\\\spaces // CHECK-SAME: -g -Os -// CHECK-SAME: -mmacosx-version-min=10.5.0 +// CHECK-SAME: -mmacos-version-min=10.5.0 int x;