diff options
Diffstat (limited to 'test/Driver/darwin-version.c')
-rw-r--r-- | test/Driver/darwin-version.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/test/Driver/darwin-version.c b/test/Driver/darwin-version.c index 4a9cdf9e5f52..75279b9e0c5d 100644 --- a/test/Driver/darwin-version.c +++ b/test/Driver/darwin-version.c @@ -205,7 +205,8 @@ // RUN: %clang -target x86_64-apple-ios -miphonesimulator-version-min=10.0 -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV3 %s -// CHECK-VERSION-TNO-OSV3: overriding '-mios-simulator-version-min=10.0' option with '--target=x86_64-apple-ios' +// CHECK-VERSION-TNO-OSV3: "x86_64-apple-ios10.0.0-simulator" +// CHECK-VERSION-TNO-OSV3-NOT: overriding '-mios-simulator-version-min // CHECK-VERSION-TNO-OSV3-NOT: argument unused during compilation // RUN: %clang -target arm64-apple-ios10.1.0 -miphoneos-version-min=10.1.0.1 -c %s -### 2>&1 | \ @@ -217,7 +218,7 @@ // CHECK-VERSION-TNO-SAME-NOT: overriding // CHECK-VERSION-TNO-SAME-NOT: argument unused during compilation -// Target with OS version is not overriden by -m<os>-version-min variables: +// Target with OS version is not overridden by -m<os>-version-min variables: // RUN: %clang -target x86_64-apple-macos10.11.2 -mmacos-version-min=10.6 -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV1 %s @@ -235,7 +236,25 @@ // RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV4 %s // CHECK-VERSION-TIGNORE-OSV4: "thumbv7k-apple-watchos3.0.0" -// Target with OS version is not overriden by environment variables: +// Target without OS version includes the OS given by -m<os>-version-min arguments: + +// RUN: %clang -target x86_64-apple-macos -mmacos-version-min=10.11 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG1 %s +// CHECK-VERSION-USE-OS-ARG1: "x86_64-apple-macosx10.11.0" + +// RUN: %clang -target arm64-apple-ios -mios-version-min=9.0 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG2 %s +// CHECK-VERSION-USE-OS-ARG2: "arm64-apple-ios9.0.0" + +// RUN: %clang -target arm64-apple-tvos -mtvos-version-min=10.0 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG3 %s +// CHECK-VERSION-USE-OS-ARG3: "arm64-apple-tvos10.0.0" + +// RUN: %clang -target armv7k-apple-watchos -mwatchos-version-min=4 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG4 %s +// CHECK-VERSION-USE-OS-ARG4: "thumbv7k-apple-watchos4.0.0" + +// Target with OS version is not overridden by environment variables: // RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 \ // RUN: %clang -target i386-apple-macos10.5 -c %s -### 2>&1 | \ @@ -257,7 +276,7 @@ // RUN: FileCheck --check-prefix=CHECK-VERSION-TWATCHOS-CMD %s // CHECK-VERSION-TWATCHOS-CMD: "thumbv7k-apple-watchos3.0.0" -// Target with OS version is not overriden by the SDK: +// Target with OS version is not overridden by the SDK: // RUN: %clang -target armv7-apple-ios9 -Wno-missing-sysroot -isysroot SDKs/iPhoneOS11.0.sdk -c -### %s 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-TIOS-SDK %s @@ -271,7 +290,7 @@ // RUN: FileCheck --check-prefix=CHECK-VERSION-TTVOS-SDK %s // CHECK-VERSION-TTVOS-SDK: thumbv7-apple-tvos9 -// Target with OS version is not overriden by arch: +// Target with OS version is not overridden by arch: // RUN: %clang -target uknown-apple-macos10.11.2 -arch=armv7k -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-ARCH1 %s |