| 1 |
// On some platforms, -stdlib=libc++ is currently ignored, so -lc++experimental is not added. |
| 2 |
// Once -stdlib=libc++ works on those, this XFAIL can be removed. |
| 3 |
// XFAIL: target={{.*-windows-msvc.*}}, target={{.*-(ps4|ps5)}} |
| 4 |
|
| 5 |
// For some reason, this fails with a core dump on AIX. This needs to be investigated. |
| 6 |
// UNSUPPORTED: target={{.*}}-aix{{.*}} |
| 7 |
|
| 8 |
// RUN: %clangxx -fexperimental-library -stdlib=libc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBCXX %s |
| 9 |
// RUN: %clangxx -fexperimental-library -stdlib=libstdc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBSTDCXX %s |
| 10 |
// RUN: %clangxx -fexperimental-library -stdlib=libc++ -nostdlib++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-NOSTDLIB %s |
| 11 |
|
| 12 |
/// The FreeBSD driver did not support -stdlib=libstdc++ previously, check that it does the right thing here. |
| 13 |
// RUN: %clangxx --target=x86_64-unknown-freebsd -fexperimental-library -stdlib=libc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBCXX %s |
| 14 |
// RUN: %clangxx --target=x86_64-unknown-freebsd -fexperimental-library -stdlib=libstdc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBSTDCXX %s |
| 15 |
// RUN: %clangxx --target=x86_64-unknown-freebsd -fexperimental-library -stdlib=libc++ -nostdlib++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-NOSTDLIB %s |
| 16 |
|
| 17 |
// -fexperimental-library must be passed to CC1. |
| 18 |
// CHECK: -fexperimental-library |
| 19 |
|
| 20 |
// Depending on the stdlib in use, we should (or not) pass -lc++experimental. |
| 21 |
// CHECK-LIBCXX: -lc++experimental |
| 22 |
// CHECK-LIBSTDCXX-NOT: -lc++experimental |
| 23 |
// CHECK-NOSTDLIB-NOT: -lc++experimental |