diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-12-09 02:27:11 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-12-09 02:27:11 +0000 |
commit | b3fb7b61929008665fef08dea8752df3a2636e25 (patch) | |
tree | 3bdb1f2cc8b8f86c6dc6004cd736b9887bdd3685 /test/Driver | |
parent | 147c0e441526f9407c4db7afb077965d6e9861ff (diff) |
[driver][darwin] Refactor the target selection code, NFC
The simulator variant of Darwin's platforms is removed in favor of a new
environment field.
The code that selects the platform and the version is split into 4 different
functions instead of being all in one function.
This is an NFC commit, although it slightly improves the
"invalid version number" diagnostic by displaying the environment variable
instead of -m<os>-version-min if the OS version was derived from the
environment.
rdar://35813850
Differential Revision: https://reviews.llvm.org/D41035
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver')
-rw-r--r-- | test/Driver/darwin-version.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Driver/darwin-version.c b/test/Driver/darwin-version.c index a794788035..21b266b0b9 100644 --- a/test/Driver/darwin-version.c +++ b/test/Driver/darwin-version.c @@ -139,3 +139,8 @@ // RUN: %clang -target x86_64-apple-watchos4.0 -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOS-TARGET %s // CHECK-VERSION-WATCHOS-TARGET: "x86_64-apple-watchos4.0.0-simulator" + +// RUN: env MACOSX_DEPLOYMENT_TARGET=1000.1000 \ +// RUN: %clang -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-INVALID-ENV %s +// CHECK-VERSION-INVALID-ENV: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=1000.1000' |