r349393 - Make test/Driver/darwin-sdk-version.c pass on hosts < macOS10.14
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 17 13:01:05 PST 2018
Author: arphaman
Date: Mon Dec 17 13:01:04 2018
New Revision: 349393
URL: http://llvm.org/viewvc/llvm-project?rev=349393&view=rev
Log:
Make test/Driver/darwin-sdk-version.c pass on hosts < macOS10.14
The test test/Driver/darwin-sdk-version.c from r349380 checks if the macOS
deployment target can be correctly inferred from the SDK version. When the
SDK version is > host version, the driver will pick the host version, so
the old test failed on macOS < 10.14. This commit makes this test more
resilient by using an older SDK version.
Modified:
cfe/trunk/test/Driver/darwin-sdk-version.c
Modified: cfe/trunk/test/Driver/darwin-sdk-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-sdk-version.c?rev=349393&r1=349392&r2=349393&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-sdk-version.c (original)
+++ cfe/trunk/test/Driver/darwin-sdk-version.c Mon Dec 17 13:01:04 2018
@@ -7,7 +7,7 @@
// RUN: mkdir -p %t/SDKs/MacOSX10.10.sdk
// RUN: %clang -isysroot %t/SDKs/MacOSX10.10.sdk -c -### %s 2>&1 \
// RUN: | FileCheck --check-prefix=INFER_SDK_VERSION %s
-// RUN: cp %S/Inputs/MacOSX10.14.sdk/SDKSettings.json %t/SDKs/MacOSX10.10.sdk
+// RUN: sed -e 's/10\.14/10\.8/g' %S/Inputs/MacOSX10.14.sdk/SDKSettings.json > %t/SDKs/MacOSX10.10.sdk/SDKSettings.json
// RUN: %clang -isysroot %t/SDKs/MacOSX10.10.sdk -c -### %s 2>&1 \
// RUN: | FileCheck --check-prefix=INFER_DEPLOYMENT_TARGET_VERSION %s
// REQUIRES: system-darwin && native
@@ -32,6 +32,6 @@
// CHECK: -target-sdk-version=10.14
// INFER_SDK_VERSION: "-triple" "x86_64-apple-macosx10.10.0"
// INFER_SDK_VERSION-SAME: -target-sdk-version=10.10
-// INFER_DEPLOYMENT_TARGET_VERSION: "-triple" "x86_64-apple-macosx10.14.0"
+// INFER_DEPLOYMENT_TARGET_VERSION: "-triple" "x86_64-apple-macosx10.8.0"
// NO_VERSION-NOT: target-sdk-version
// ERROR: warning: SDK settings were ignored as 'SDKSettings.json' could not be parsed
More information about the cfe-commits
mailing list