[test] Fix Driver/gcc-toolchain.cpp if CLANG_DEFAULT_CXX_STDLIB is libc++
authorFangrui Song <i@maskray.me>
Sat, 20 Mar 2021 18:06:44 +0000 (11:06 -0700)
committerFangrui Song <i@maskray.me>
Sat, 20 Mar 2021 18:06:44 +0000 (11:06 -0700)
clang/test/Driver/gcc-toolchain.cpp

index 03a7991..8bb391f 100644 (file)
@@ -1,12 +1,12 @@
 // Test that gcc-toolchain option is working correctly
 //
-// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
-// RUN:   --target=x86_64-linux-gnu --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr | \
+// RUN: %clangxx -no-canonical-prefixes %s -### -o %t --target=x86_64-linux-gnu \
+// RUN:   --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ 2>&1 | \
 // RUN:   FileCheck %s
 //
 // Additionally check that the legacy spelling of the flag works.
-// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
-// RUN:   --target=x86_64-linux-gnu -gcc-toolchain %S/Inputs/ubuntu_14.04_multiarch_tree/usr | \
+// RUN: %clangxx -no-canonical-prefixes %s -### -o %t --target=x86_64-linux-gnu \
+// RUN:   --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ 2>&1 | \
 // RUN:   FileCheck %s
 //
 // Test for header search toolchain detection.