Fix test failures after r361278 on non-Darwin platforms and when
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 May 2019 20:10:52 +0000 (20:10 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 May 2019 20:10:52 +0000 (20:10 +0000)
CLANG_DEFAULT_STDLIB is defined to libstdc++.

llvm-svn: 361301

clang/test/Driver/darwin-header-search-libcxx.cpp
clang/test/Driver/darwin-header-search-libstdcxx.cpp

index 6111ac8f091bc8abd579ed28acb03bac180e4e3c..98bd0954481a5695cc27b10f51a638dccc965114 100644 (file)
 // C++ library include paths (so all except <toolchain>/usr/bin/../include/c++/v1).
 //
 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
-// RUN:     -target x86_64-apple-darwin \
+// RUN:     -target x86_64-apple-darwin16 \
 // RUN:     -ccc-install-dir %S/Inputs/basic_darwin_toolchain/usr/bin \
 // RUN:     -resource-dir=%S/Inputs/resource_dir \
 // RUN:     -isysroot %S/Inputs/basic_darwin_sdk_usr \
+// RUN:     -stdlib=platform \
 // RUN:     -nostdinc \
 // RUN:   | FileCheck -DSYSROOT=%S/Inputs/basic_darwin_sdk_usr \
 // RUN:               -DTOOLCHAIN=%S/Inputs/basic_darwin_toolchain \
 // CHECK-LIBCXX-NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
 //
 // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
-// RUN:     -target x86_64-apple-darwin \
+// RUN:     -target x86_64-apple-darwin16 \
 // RUN:     -ccc-install-dir %S/Inputs/basic_darwin_toolchain/usr/bin \
 // RUN:     -resource-dir=%S/Inputs/resource_dir \
 // RUN:     -isysroot %S/Inputs/basic_darwin_sdk_usr \
+// RUN:     -stdlib=platform \
 // RUN:     -nostdinc \
 // RUN:   | FileCheck -DSYSROOT=%S/Inputs/basic_darwin_sdk_usr \
 // RUN:               -DTOOLCHAIN=%S/Inputs/basic_darwin_toolchain \
index 66dff6730112a3f61a7d5a85035f4256f80bbb2c..480fb8c6de9ec6e3e470325f1ef5da4c2684236e 100644 (file)
 // RUN:    | FileCheck -allow-empty --check-prefix=CHECK-LIBSTDCXX-MISSING-1 %s
 // CHECK-LIBSTDCXX-MISSING-1-NOT: warning
 //
-// RUN: %clang %s -target x86_64-apple-darwin -fsyntax-only 2>&1 \
-// RUN:           -isysroot %S/Inputs/basic_darwin_sdk_no_libstdcxx \
+// RUN: %clang %s -target x86_64-apple-darwin16 -fsyntax-only 2>&1 \
+// RUN:           -isysroot %S/Inputs/basic_darwin_sdk_no_libstdcxx -stdlib=platform \
 // RUN:    | FileCheck -allow-empty --check-prefix=CHECK-LIBSTDCXX-MISSING-2 %s
 // CHECK-LIBSTDCXX-MISSING-2-NOT: warning