| 1 |
// UNSUPPORTED: system-windows |
| 2 |
|
| 3 |
// This file tests that the GCC installation directory detection takes |
| 4 |
// the libstdc++ includes into account. In each directory |
| 5 |
// Inputs/gcc_toolchain_libstdcxx/gccX, the installation directory for |
| 6 |
// gcc X should be picked in the future since it is the directory with |
| 7 |
// the largest version number which also contains the libstdc++ |
| 8 |
// include directory. |
| 9 |
|
| 10 |
// RUN: %clang --target=x86_64-linux-gnu --gcc-toolchain=%S/Inputs/gcc_toolchain_libstdcxx/gcc10/usr -v 2>&1 | FileCheck %s --check-prefix=GCC10 |
| 11 |
// GCC10: clang: warning: future releases of the clang compiler will prefer GCC installations containing libstdc++ include directories; '[[PREFIX:.*gcc_toolchain_libstdcxx/gcc10/usr/lib/gcc/x86_64-linux-gnu]]/10' would be chosen over '[[PREFIX]]/12' [-Wgcc-install-dir-libstdcxx] |
| 12 |
// GCC10: Found candidate GCC installation: [[PREFIX]]/10 |
| 13 |
// GCC10: Found candidate GCC installation: [[PREFIX]]/11 |
| 14 |
// GCC10: Found candidate GCC installation: [[PREFIX]]/12 |
| 15 |
// GCC10: Selected GCC installation: [[PREFIX]]/12 |
| 16 |
|
| 17 |
// RUN: %clang --target=x86_64-linux-gnu --gcc-toolchain=%S/Inputs/gcc_toolchain_libstdcxx/gcc11/usr -v 2>&1 | FileCheck %s --check-prefix=ONLY_GCC11 |
| 18 |
// ONLY_GCC11: clang: warning: future releases of the clang compiler will prefer GCC installations containing libstdc++ include directories; '[[PREFIX:.*gcc_toolchain_libstdcxx/gcc11/usr/lib/gcc/x86_64-linux-gnu]]/11' would be chosen over '[[PREFIX]]/12' [-Wgcc-install-dir-libstdcxx] |
| 19 |
// ONLY_GCC11: Found candidate GCC installation: [[PREFIX]]/10 |
| 20 |
// ONLY_GCC11: Found candidate GCC installation: [[PREFIX]]/11 |
| 21 |
// ONLY_GCC11: Found candidate GCC installation: [[PREFIX]]/12 |
| 22 |
// ONLY_GCC11: Selected GCC installation: [[PREFIX]]/12 |
| 23 |
|
| 24 |
// RUN: %clang --target=x86_64-linux-gnu --gcc-toolchain=%S/Inputs/gcc_toolchain_libstdcxx/gcc12/usr -v 2>&1 | FileCheck %s --check-prefix=GCC12 |
| 25 |
// GCC12: Found candidate GCC installation: [[PREFIX:.*gcc_toolchain_libstdcxx/gcc12/usr/lib/gcc/x86_64-linux-gnu]]/10 |
| 26 |
// GCC12: Found candidate GCC installation: [[PREFIX]]/11 |
| 27 |
// GCC12: Found candidate GCC installation: [[PREFIX]]/12 |
| 28 |
// GCC12: Selected GCC installation: [[PREFIX]]/12 |