Skip to content

Commit edabb5c

Browse files
Xazax-hunGabor Horvath
andauthored
[clang] Clean up macOS version flags (#95374)
The -mmacos-version-min flag is preferred over -mmacosx-version-min. This patch updates the tests and documentation to make this clear and also adds the missing logic to scan build to handle the new flag. Fixes #86376. Co-authored-by: Gabor Horvath <[email protected]>
1 parent 630a6dd commit edabb5c

19 files changed

+47
-46
lines changed

clang/docs/CommandGuide/clang.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ number of cross compilers, or may only support a native target.
362362

363363
Specify the architecture to build for (all platforms).
364364

365-
.. option:: -mmacosx-version-min=<version>
365+
.. option:: -mmacos-version-min=<version>
366366

367367
When building for macOS, specify the minimum version supported by your
368368
application.
@@ -723,7 +723,7 @@ ENVIRONMENT
723723

724724
.. envvar:: MACOSX_DEPLOYMENT_TARGET
725725

726-
If :option:`-mmacosx-version-min` is unspecified, the default deployment
726+
If :option:`-mmacos-version-min` is unspecified, the default deployment
727727
target is read from this environment variable. This option only affects
728728
Darwin targets.
729729

clang/docs/LanguageExtensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ Objective-C @available
20632063
----------------------
20642064
20652065
It is possible to use the newest SDK but still build a program that can run on
2066-
older versions of macOS and iOS by passing ``-mmacosx-version-min=`` /
2066+
older versions of macOS and iOS by passing ``-mmacos-version-min=`` /
20672067
``-miphoneos-version-min=``.
20682068
20692069
Before LLVM 5.0, when calling a function that exists only in the OS that's
@@ -2084,7 +2084,7 @@ When a method that's introduced in the OS newer than the target OS is called, a
20842084
20852085
void my_fun(NSSomeClass* var) {
20862086
// If fancyNewMethod was added in e.g. macOS 10.12, but the code is
2087-
// built with -mmacosx-version-min=10.11, then this unconditional call
2087+
// built with -mmacos-version-min=10.11, then this unconditional call
20882088
// will emit a -Wunguarded-availability warning:
20892089
[var fancyNewMethod];
20902090
}

clang/include/clang/Driver/ToolChain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class ToolChain {
639639

640640
/// ComputeEffectiveClangTriple - Return the Clang triple to use for this
641641
/// target, which may take into account the command line arguments. For
642-
/// example, on Darwin the -mmacosx-version-min= command line argument (which
642+
/// example, on Darwin the -mmacos-version-min= command line argument (which
643643
/// sets the deployment target) determines the version in the triple passed to
644644
/// Clang.
645645
virtual std::string ComputeEffectiveClangTriple(

clang/test/Coverage/targets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-unknown -emit-llvm -o %t %s
1515

1616
// clang 1.0 fails to compile Python 2.6
17-
// RUN: %clang -target x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4
17+
// RUN: %clang -target x86_64-apple-darwin9 -### -S %s -mmacos-version-min=10.4

clang/test/Driver/arc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: not %clang -x objective-c++ -target i386-apple-darwin10 -stdlib=libstdc++ -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
44
// RUN: not %clang -x c -target i386-apple-darwin10 -stdlib=libstdc++ -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
55
// RUN: not %clang -x c++ -target i386-apple-darwin10 -stdlib=libstdc++ -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
6-
// RUN: not %clang -x objective-c -target x86_64-apple-darwin11 -mmacosx-version-min=10.5 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTSUPPORTED %s
6+
// RUN: not %clang -x objective-c -target x86_64-apple-darwin11 -mmacos-version-min=10.5 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTSUPPORTED %s
77

88
// Just to test clang is working.
99
# foo

clang/test/Driver/arclite-link.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: touch %t.o
22
// RUN: mkdir -p %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
3-
// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.10 %t.o \
3+
// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacos-version-min=10.10 %t.o \
44
// RUN: -isysroot %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
5-
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.11 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
6-
// RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
5+
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacos-version-min=10.11 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
6+
// RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacos-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
77
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -nostdlib %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOSTDLIB %s
88

99
// CHECK-ARCLITE-OSX: .tmpdir/Xcode.app/{{.*}}libarclite_macosx.a';
@@ -16,7 +16,7 @@
1616
// CHECK-NOARCLITE-NOT: libarclite
1717
// CHECK-NOSTDLIB-NOT: -lobjc
1818

19-
// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
19+
// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacos-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
2020

2121
// CHECK-UNUSED-NOT: warning: argument unused during compilation: '-fobjc-link-runtime'
2222

clang/test/Driver/darwin-objc-defaults.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// i386
44

55
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
6-
// RUN: -arch i386 -mmacosx-version-min=10.5 2> %t
6+
// RUN: -arch i386 -mmacos-version-min=10.5 2> %t
77
// RUN: FileCheck --check-prefix CHECK-CHECK-I386_OSX10_5 < %t %s
88

99
// CHECK-CHECK-I386_OSX10_5: "-cc1"
@@ -12,7 +12,7 @@
1212
// CHECK-CHECK-I386_OSX10_5: darwin-objc-defaults
1313

1414
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
15-
// RUN: -arch i386 -mmacosx-version-min=10.6 2> %t
15+
// RUN: -arch i386 -mmacos-version-min=10.6 2> %t
1616
// RUN: FileCheck --check-prefix CHECK-CHECK-I386_OSX10_6 < %t %s
1717

1818
// CHECK-CHECK-I386_OSX10_6: "-cc1"
@@ -32,14 +32,14 @@
3232
// x86_64
3333

3434
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
35-
// RUN: -arch x86_64 -mmacosx-version-min=10.4 2> %t
35+
// RUN: -arch x86_64 -mmacos-version-min=10.4 2> %t
3636
// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_4 < %t %s
3737

3838
// CHECK-CHECK-X86_64_OSX10_4: "-cc1"
3939
// CHECK-CHECK-X86_64_OSX10_4: -fobjc-dispatch-method=non-legacy
4040

4141
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
42-
// RUN: -arch x86_64 -mmacosx-version-min=10.5 2> %t
42+
// RUN: -arch x86_64 -mmacos-version-min=10.5 2> %t
4343
// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_5 < %t %s
4444

4545

@@ -49,7 +49,7 @@
4949
// CHECK-CHECK-X86_64_OSX10_5: darwin-objc-defaults
5050

5151
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
52-
// RUN: -arch x86_64 -mmacosx-version-min=10.6 2> %t
52+
// RUN: -arch x86_64 -mmacos-version-min=10.6 2> %t
5353
// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_6 < %t %s
5454

5555
// CHECK-CHECK-X86_64_OSX10_6: "-cc1"
@@ -67,7 +67,7 @@
6767
// armv7
6868

6969
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
70-
// RUN: -arch armv7 -mmacosx-version-min=10.5 2> %t
70+
// RUN: -arch armv7 -mmacos-version-min=10.5 2> %t
7171
// RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_OSX10_5 < %t %s
7272

7373
// CHECK-CHECK-ARMV7_OSX10_5: "-cc1"
@@ -76,7 +76,7 @@
7676
// CHECK-CHECK-ARMV7_OSX10_5: darwin-objc-defaults
7777

7878
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
79-
// RUN: -arch armv7 -mmacosx-version-min=10.6 2> %t
79+
// RUN: -arch armv7 -mmacos-version-min=10.6 2> %t
8080
// RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_OSX10_6 < %t %s
8181

8282
// CHECK-CHECK-ARMV7_OSX10_6: "-cc1"

clang/test/Driver/darwin-stdlib-dont-pass-in-c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test ensures that the Driver doesn't pass -stdlib= down to CC1 when compiling C code.
22

33
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch arm64 -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s
4-
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacosx-version-min=10.9 %s -### 2>&1 | FileCheck %s
4+
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacos-version-min=10.9 %s -### 2>&1 | FileCheck %s
55
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7s -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s
66
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7k %s -### 2>&1 | FileCheck %s
77

clang/test/Driver/darwin-stdlib.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Make sure that the Driver passes down -stdlib=libc++ to CC1 when specified explicitly.
22
//
33
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch arm64 -miphoneos-version-min=7.0 -stdlib=libc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBCXX %s
4-
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacosx-version-min=10.9 -stdlib=libc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBCXX %s
4+
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacos-version-min=10.9 -stdlib=libc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBCXX %s
55
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7s -miphoneos-version-min=7.0 -stdlib=libc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBCXX %s
66
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7k -stdlib=libc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBCXX %s
77
// CHECK-LIBCXX: "-stdlib=libc++"
@@ -12,7 +12,7 @@
1212
// Driver behavior for now.
1313
//
1414
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch arm64 -miphoneos-version-min=7.0 -stdlib=libstdc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBSTDCXX %s
15-
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacosx-version-min=10.9 -stdlib=libstdc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBSTDCXX %s
15+
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacos-version-min=10.9 -stdlib=libstdc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBSTDCXX %s
1616
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7s -miphoneos-version-min=7.0 -stdlib=libstdc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBSTDCXX %s
1717
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7k -stdlib=libstdc++ %s -### 2>&1 | FileCheck --check-prefix=CHECK-LIBSTDCXX %s
1818
// CHECK-LIBSTDCXX: "-stdlib=libstdc++"
@@ -23,7 +23,7 @@
2323
// going to be libc++.
2424
//
2525
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch arm64 -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
26-
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacosx-version-min=10.9 %s -### 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
26+
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -mmacos-version-min=10.9 %s -### 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
2727
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7s -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
2828
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %S/Inputs/darwin_toolchain_tree/bin/ -arch armv7k %s -### 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
2929
// CHECK-NONE-NOT: "-stdlib="

clang/test/Driver/darwin-version.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,27 @@
6262

6363
// RUN: %clang -target i686-apple-darwin8 -c %s -### 2>&1 | \
6464
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
65-
// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.4 -c %s -### 2>&1 | \
65+
// RUN: %clang -target i686-apple-darwin9 -mmacos-version-min=10.4 -c %s -### 2>&1 | \
6666
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
6767
// CHECK-VERSION-OSX4: "i686-apple-macosx10.4.0"
6868
// RUN: %clang -target i686-apple-darwin9 -c %s -### 2>&1 | \
6969
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
70-
// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.5 -c %s -### 2>&1 | \
70+
// RUN: %clang -target i686-apple-darwin9 -mmacos-version-min=10.5 -c %s -### 2>&1 | \
7171
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
7272
// CHECK-VERSION-OSX5: "i686-apple-macosx10.5.0"
7373
// RUN: %clang -target i686-apple-darwin10 -c %s -### 2>&1 | \
7474
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s
75-
// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.6 -c %s -### 2>&1 | \
75+
// RUN: %clang -target i686-apple-darwin9 -mmacos-version-min=10.6 -c %s -### 2>&1 | \
7676
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s
7777
// CHECK-VERSION-OSX6: "i686-apple-macosx10.6.0"
7878
// RUN: %clang -target x86_64-apple-darwin14 -c %s -### 2>&1 | \
7979
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
80-
// RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.10 -c %s -### 2>&1 | \
80+
// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \
8181
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
8282
// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \
8383
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
8484
// CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0"
85-
// RUN: not %clang -target x86_64-apple-darwin -mmacosx-version-min= -c %s -### 2>&1 | \
85+
// RUN: not %clang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \
8686
// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s
8787
// RUN: not %clang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \
8888
// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s

clang/test/Driver/darwin-xarch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang --target=x86_64-apple-darwin10 -### \
2-
// RUN: -arch i386 -Xarch_i386 -mmacosx-version-min=10.4 \
3-
// RUN: -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 \
2+
// RUN: -arch i386 -Xarch_i386 -mmacos-version-min=10.4 \
3+
// RUN: -arch x86_64 -Xarch_x86_64 -mmacos-version-min=10.5 \
44
// RUN: -c %s 2> %t
55
// RUN: FileCheck --check-prefix=CHECK-COMPILE < %t %s
66
//

clang/test/Driver/fsanitize.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@
545545
// RUN: %clang --target=riscv64-pc-freebsd -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FUNCTION
546546
// CHECK-FUNCTION: -cc1{{.*}}"-fsanitize=function" "-fsanitize-recover=function"
547547

548-
// RUN: not %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.8 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-OLD
548+
// RUN: not %clang --target=x86_64-apple-darwin10 -mmacos-version-min=10.8 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-OLD
549549
// CHECK-VPTR-DARWIN-OLD: unsupported option '-fsanitize=vptr' for target 'x86_64-apple-darwin10'
550550

551551
// RUN: not %clang --target=arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-IOS-OLD
@@ -557,7 +557,7 @@
557557
// RUN: %clang --target=x86_64-apple-darwin15.0.0-simulator -fsanitize=vptr %s -### 2>&1
558558
// OK
559559

560-
// RUN: %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.9 -fsanitize=alignment,vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-NEW
560+
// RUN: %clang --target=x86_64-apple-darwin10 -mmacos-version-min=10.9 -fsanitize=alignment,vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-NEW
561561
// CHECK-VPTR-DARWIN-NEW: -fsanitize=alignment,vptr
562562

563563
// RUN: %clang --target=armv7-apple-ios7 -miphoneos-version-min=7.0 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-IOS
@@ -643,7 +643,7 @@
643643
// RUN: not %clang --target=x86_64-linux-gnu -fsanitize-trap=hwaddress -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-TRAP
644644
// CHECK-HWASAN-TRAP: error: unsupported argument 'hwaddress' to option '-fsanitize-trap='
645645

646-
// RUN: not %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.7 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-OLD-MACOS
646+
// RUN: not %clang --target=x86_64-apple-darwin10 -mmacos-version-min=10.7 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-OLD-MACOS
647647
// CHECK-CFI-NOTRAP-OLD-MACOS: error: unsupported option '-fno-sanitize-trap=cfi-vcall' for target 'x86_64-apple-darwin10'
648648

649649
// RUN: %clang --target=x86_64-pc-win32 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-WIN

clang/test/Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang -### -target arm64-apple-darwin -arch arm64 -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=ARM64-10_7 %s
2-
// RUN: %clang -### -target x86_64-apple-darwin10 -arch x86_64 -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=x86_64-10_7 %s
1+
// RUN: %clang -### -target arm64-apple-darwin -arch arm64 -mmacos-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=ARM64-10_7 %s
2+
// RUN: %clang -### -target x86_64-apple-darwin10 -arch x86_64 -mmacos-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=x86_64-10_7 %s
33
// REQUIRES: system-darwin
44

55
// ARM64-10_7-NOT: -lcrt1.10.6.o

clang/test/Driver/sanitizer-ld.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@
688688
// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "--export-dynamic-symbol=__cfi_check"
689689

690690
// RUN: %clangxx -fsanitize=address -### %s 2>&1 \
691-
// RUN: -mmacosx-version-min=10.6 \
691+
// RUN: -mmacos-version-min=10.6 \
692692
// RUN: --target=x86_64-apple-darwin13.4.0 -fuse-ld=ld -stdlib=platform \
693693
// RUN: -resource-dir=%S/Inputs/resource_dir \
694694
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
@@ -698,7 +698,7 @@
698698
// CHECK-ASAN-DARWIN106-CXX-NOT: -lc++abi
699699

700700
// RUN: %clangxx -fsanitize=leak -### %s 2>&1 \
701-
// RUN: -mmacosx-version-min=10.6 \
701+
// RUN: -mmacos-version-min=10.6 \
702702
// RUN: --target=x86_64-apple-darwin13.4.0 -fuse-ld=ld -stdlib=platform \
703703
// RUN: -resource-dir=%S/Inputs/resource_dir \
704704
// RUN: --sysroot=%S/Inputs/basic_linux_tree \

clang/test/Driver/stack-protector.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343
// RUN: %clang -target arm64-apple-ios8.0.0 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_IOS
4444
// RUN: %clang -ffreestanding -target arm64-apple-ios8.0.0 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_IOS
4545
// SSP_IOS: "-stack-protector" "1"
46-
// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX
47-
// RUN: %clang -ffreestanding -target x86_64-apple-darwin10 -mmacosx-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX
46+
// RUN: %clang -target x86_64-apple-darwin10 -mmacos-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX
47+
// RUN: %clang -ffreestanding -target x86_64-apple-darwin10 -mmacos-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX
4848
// SSP_MACOSX: "-stack-protector" "1"
49-
// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.5 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_5
50-
// RUN: %clang -ffreestanding -target x86_64-apple-darwin10 -mmacosx-version-min=10.5 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_5
49+
// RUN: %clang -target x86_64-apple-darwin10 -mmacos-version-min=10.5 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_5
50+
// RUN: %clang -ffreestanding -target x86_64-apple-darwin10 -mmacos-version-min=10.5 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_5
5151
// SSP_MACOSX_10_5: "-stack-protector" "1"
52-
// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.5 -mkernel -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_KERNEL
52+
// RUN: %clang -target x86_64-apple-darwin10 -mmacos-version-min=10.5 -mkernel -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_KERNEL
5353
// SSP_MACOSX_KERNEL-NOT: "-stack-protector"
54-
// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_6_KERNEL
55-
// RUN: %clang -ffreestanding -target x86_64-apple-darwin10 -mmacosx-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_6_KERNEL
54+
// RUN: %clang -target x86_64-apple-darwin10 -mmacos-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_6_KERNEL
55+
// RUN: %clang -ffreestanding -target x86_64-apple-darwin10 -mmacos-version-min=10.6 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_MACOSX_10_6_KERNEL
5656
// SSP_MACOSX_10_6_KERNEL: "-stack-protector" "1"
5757

0 commit comments

Comments
 (0)