Skip to content

Commit 921ab75

Browse files
committed
[Driver] Add a "-mmacos_version_min" option that's an alias for
"-mmacosx_version_min" The option -mmacosx_version_min will still be the canonical option for now, but in the future we will switch over to -mmacos_version_min and make -mmacosx_version_min an alias instead. rdar://27043820 Differential Revision: https://reviews.llvm.org/D32796 llvm-svn: 302240
1 parent 27b0927 commit 921ab75

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,8 @@ def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option,CC1AsOption,CoreOption]>,
16881688
HelpText<"Additional arguments to forward to LLVM's option processing">;
16891689
def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">,
16901690
Group<m_Group>, HelpText<"Set Mac OS X deployment target">;
1691+
def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
1692+
Group<m_Group>, Alias<mmacosx_version_min_EQ>;
16911693
def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
16921694
HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">;
16931695
def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>,

clang/test/Driver/darwin-version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
3030
// RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min=10.10 -c %s -### 2>&1 | \
3131
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
32+
// RUN: %clang -target x86_64-apple-macosx -mmacos-version-min=10.10 -c %s -### 2>&1 | \
33+
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
3234
// CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0"
3335
// RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min= -c %s -### 2>&1 | \
3436
// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s
37+
// RUN: %clang -target x86_64-apple-macosx -mmacos-version-min= -c %s -### 2>&1 | \
38+
// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s
3539
// CHECK-VERSION-MISSING: invalid version number
3640
// RUN: %clang -target armv7k-apple-darwin -mwatchos-version-min=2.0 -c %s -### 2>&1 | \
3741
// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOS20 %s

0 commit comments

Comments
 (0)