11a2f4824SShuhong Liu // Tests that the AIX toolchain adds system includes to its search path. 21a2f4824SShuhong Liu 31a2f4824SShuhong Liu // Check powerpc-ibm-aix, 32-bit/64-bit. 4*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 5*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 61a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 71a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 81f3925e2SDavid Tenty // RUN: | FileCheck -check-prefixes=CHECK-INTERNAL-INCLUDE,CHECK-INTERNAL-INCLUDE-CXX %s 91a2f4824SShuhong Liu 10*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 11*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 121a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 131a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 141f3925e2SDavid Tenty // RUN: | FileCheck -check-prefixes=CHECK-INTERNAL-INCLUDE,CHECK-INTERNAL-INCLUDE-CXX %s 151a2f4824SShuhong Liu 16*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 17*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 181a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 191a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 201a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-INTERNAL-INCLUDE %s 211a2f4824SShuhong Liu 22*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 23*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 241a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 251a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 261a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-INTERNAL-INCLUDE %s 271a2f4824SShuhong Liu 28*cb1654eeSFangrui Song // CHECK-INTERNAL-INCLUDE: "-cc1" 291a2f4824SShuhong Liu // CHECK-INTERNAL-INCLUDE: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" 301a2f4824SShuhong Liu // CHECK-INTERNAL-INCLUDE: "-isysroot" "[[SYSROOT:[^"]+]]" 311f3925e2SDavid Tenty // CHECK-INTERNAL-INCLUDE-CXX: "-internal-isystem" "[[SYSROOT]]{{(/|\\\\)}}opt{{(/|\\\\)}}IBM{{(/|\\\\)}}openxlCSDK{{(/|\\\\)}}include{{(/|\\\\)}}c++{{(/|\\\\)}}v1" 321f3925e2SDavid Tenty // CHECK-INTERNAL-INCLUDE-CXX: "-D__LIBC_NO_CPP_MATH_OVERLOADS__" 331a2f4824SShuhong Liu // CHECK-INTERNAL-INCLUDE: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include" 341a2f4824SShuhong Liu // CHECK-INTERNAL-INCLUDE: "-internal-isystem" "[[SYSROOT]]/usr/include" 351a2f4824SShuhong Liu 361a2f4824SShuhong Liu // Check powerpc-ibm-aix, 32-bit/64-bit. -nostdinc option. 37*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 38*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 391a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 401a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 411a2f4824SShuhong Liu // RUN: -nostdinc \ 421a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDINC-INCLUDE %s 431a2f4824SShuhong Liu 44*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 45*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 461a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 471a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 481a2f4824SShuhong Liu // RUN: -nostdinc \ 491a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDINC-INCLUDE %s 501a2f4824SShuhong Liu 51*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 52*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 531a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 541a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 551a2f4824SShuhong Liu // RUN: -nostdinc \ 561a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDINC-INCLUDE %s 571a2f4824SShuhong Liu 58*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 59*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 601a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 611a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 621a2f4824SShuhong Liu // RUN: -nostdinc \ 631a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDINC-INCLUDE %s 641a2f4824SShuhong Liu 65*cb1654eeSFangrui Song // CHECK-NOSTDINC-INCLUDE: "-cc1" 661a2f4824SShuhong Liu // CHECK-NOSTDINC-INCLUDE: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" 671a2f4824SShuhong Liu // CHECK-NOSTDINC-INCLUDE: "-isysroot" "[[SYSROOT:[^"]+]]" 681a2f4824SShuhong Liu // CHECK-NOSTDINC-INCLUDE-NOT: "-internal-isystem" 691a2f4824SShuhong Liu 701a2f4824SShuhong Liu // Check powerpc-ibm-aix, 32-bit/64-bit. -nostdlibinc option. 71*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 72*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 731a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 741a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 751a2f4824SShuhong Liu // RUN: -nostdlibinc \ 761a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDLIBINC-INCLUDE %s 771a2f4824SShuhong Liu 78*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 79*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 801a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 811a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 821a2f4824SShuhong Liu // RUN: -nostdlibinc \ 831a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDLIBINC-INCLUDE %s 841a2f4824SShuhong Liu 85*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 86*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 871a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 881a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 891a2f4824SShuhong Liu // RUN: -nostdlibinc \ 901a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDLIBINC-INCLUDE %s 911a2f4824SShuhong Liu 92*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 93*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 941a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 951a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 961a2f4824SShuhong Liu // RUN: -nostdlibinc \ 971a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOSTDLIBINC-INCLUDE %s 981a2f4824SShuhong Liu 99*cb1654eeSFangrui Song // CHECK-NOSTDLIBINC-INCLUDE: "-cc1" 1001a2f4824SShuhong Liu // CHECK-NOSTDLIBINC-INCLUDE: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" 1011a2f4824SShuhong Liu // CHECK-NOSTDLIBINC-INCLUDE: "-isysroot" "[[SYSROOT:[^"]+]]" 1021a2f4824SShuhong Liu // CHECK-NOSTDLIBINC-INCLUDE: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include" 1031f3925e2SDavid Tenty // CHECK-NOSTDLIBINC-INCLUDE-NOT: "-internal-isystem" "[[SYSROOT]]{{(/|\\\\)}}opt{{(/|\\\\)}}IBM{{(/|\\\\)}}openxlCSDK{{(/|\\\\)}}include{{(/|\\\\)}}c++{{(/|\\\\)}}v1" 1041f3925e2SDavid Tenty // CHECK-NOSTDLIBINC-INCLUDE-NOT: "-D__LIBC_NO_CPP_MATH_OVERLOADS__" 1051a2f4824SShuhong Liu // CHECK-NOSTDLIBINC-INCLUDE-NOT: "-internal-isystem" "[[SYSROOT]]/usr/include" 1061a2f4824SShuhong Liu 1071a2f4824SShuhong Liu // Check powerpc-ibm-aix, 32-bit/64-bit. -nobuiltininc option. 108*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 109*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 1101a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 1111a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 1121a2f4824SShuhong Liu // RUN: -nobuiltininc \ 1131f3925e2SDavid Tenty // RUN: | FileCheck -check-prefixes=CHECK-NOBUILTININC-INCLUDE,CHECK-NOBUILTININC-INCLUDE-CXX %s 1141a2f4824SShuhong Liu 115*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 116*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 1171a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 1181a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 1191a2f4824SShuhong Liu // RUN: -nobuiltininc \ 1201f3925e2SDavid Tenty // RUN: | FileCheck -check-prefixes=CHECK-NOBUILTININC-INCLUDE,CHECK-NOBUILTININC-INCLUDE-CXX %s 1211a2f4824SShuhong Liu 122*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 123*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 1241a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 1251a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 1261a2f4824SShuhong Liu // RUN: -nobuiltininc \ 1271a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOBUILTININC-INCLUDE %s 1281a2f4824SShuhong Liu 129*cb1654eeSFangrui Song // RUN: %clang -### -xc %s 2>&1 \ 130*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 1311a2f4824SShuhong Liu // RUN: -resource-dir=%S/Inputs/resource_dir \ 1321a2f4824SShuhong Liu // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 1331a2f4824SShuhong Liu // RUN: -nobuiltininc \ 1341a2f4824SShuhong Liu // RUN: | FileCheck -check-prefix=CHECK-NOBUILTININC-INCLUDE %s 1351a2f4824SShuhong Liu 136*cb1654eeSFangrui Song // CHECK-NOBUILTININC-INCLUDE: "-cc1" 1371a2f4824SShuhong Liu // CHECK-NOBUILTININC-INCLUDE: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" 1381a2f4824SShuhong Liu // CHECK-NOBUILTININC-INCLUDE: "-isysroot" "[[SYSROOT:[^"]+]]" 1391a2f4824SShuhong Liu // CHECK-NOBUILTININC-INCLUDE-NOT: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include" 1401f3925e2SDavid Tenty // CHECK-NOBUILTININC-INCLUDE-CXX: "-internal-isystem" "[[SYSROOT]]{{(/|\\\\)}}opt{{(/|\\\\)}}IBM{{(/|\\\\)}}openxlCSDK{{(/|\\\\)}}include{{(/|\\\\)}}c++{{(/|\\\\)}}v1" 1411f3925e2SDavid Tenty // CHECK-NOBUILTININC-INCLUDE-CXX: "-D__LIBC_NO_CPP_MATH_OVERLOADS__" 1421a2f4824SShuhong Liu // CHECK-NOBUILTININC-INCLUDE: "-internal-isystem" "[[SYSROOT]]/usr/include" 1431f3925e2SDavid Tenty 1441f3925e2SDavid Tenty // Check powerpc-ibm-aix, 32-bit/64-bit. -nostdinc++ option. 145*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 146*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 1471f3925e2SDavid Tenty // RUN: -resource-dir=%S/Inputs/resource_dir \ 1481f3925e2SDavid Tenty // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 1491f3925e2SDavid Tenty // RUN: -nostdinc++ \ 1501f3925e2SDavid Tenty // RUN: | FileCheck -check-prefix=CHECK-NOSTDINCXX-INCLUDE %s 1511f3925e2SDavid Tenty 152*cb1654eeSFangrui Song // RUN: %clangxx -### %s 2>&1 \ 153*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 1541f3925e2SDavid Tenty // RUN: -resource-dir=%S/Inputs/resource_dir \ 1551f3925e2SDavid Tenty // RUN: --sysroot=%S/Inputs/basic_aix_tree \ 1561f3925e2SDavid Tenty // RUN: -nostdinc++ \ 1571f3925e2SDavid Tenty // RUN: | FileCheck -check-prefix=CHECK-NOSTDINCXX-INCLUDE %s 1581f3925e2SDavid Tenty 159*cb1654eeSFangrui Song // CHECK-NOSTDINCXX-INCLUDE: "-cc1" 1601f3925e2SDavid Tenty // CHECK-NOSTDINCXX-INCLUDE: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" 1611f3925e2SDavid Tenty // CHECK-NOSTDINCXX-INCLUDE: "-isysroot" "[[SYSROOT:[^"]+]]" 1621f3925e2SDavid Tenty // CHECK-NOSTDINCXX-INCLUDE: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include" 1631f3925e2SDavid Tenty // CHECK-NOSTDINCXX-INCLUDE-NOT: "-internal-isystem" "[[SYSROOT]]{{(/|\\\\)}}opt{{(/|\\\\)}}IBM{{(/|\\\\)}}openxlCSDK{{(/|\\\\)}}include{{(/|\\\\)}}c++{{(/|\\\\)}}v1" 1641f3925e2SDavid Tenty // CHECK-NOSTDINCXX-INCLUDE-NOT: "-D__LIBC_NO_CPP_MATH_OVERLOADS__" 1651f3925e2SDavid Tenty // CHECK-NOSTDINCXX-INCLUDE: "-internal-isystem" "[[SYSROOT]]/usr/include" 1661f3925e2SDavid Tenty 1671f3925e2SDavid Tenty // Check powerpc-ibm-aix, 32-bit. -stdlib=libstdc++ invokes fatal error. 168*cb1654eeSFangrui Song // RUN: not --crash %clangxx %s 2>&1 -### \ 169*cb1654eeSFangrui Song // RUN: --target=powerpc-ibm-aix \ 1701f3925e2SDavid Tenty // RUN: -stdlib=libstdc++ \ 1711f3925e2SDavid Tenty // RUN: --sysroot %S/Inputs/aix_ppc_tree \ 1721f3925e2SDavid Tenty // RUN: | FileCheck --check-prefix=CHECK-INCLUDE-LIBSTDCXX %s 1731f3925e2SDavid Tenty 1741f3925e2SDavid Tenty // Check powerpc64-ibm-aix, 64-bit. -stdlib=libstdc++ invokes fatal error. 175*cb1654eeSFangrui Song // RUN: not --crash %clangxx %s 2>&1 -### \ 176*cb1654eeSFangrui Song // RUN: --target=powerpc64-ibm-aix \ 1771f3925e2SDavid Tenty // RUN: -stdlib=libstdc++ \ 1781f3925e2SDavid Tenty // RUN: --sysroot %S/Inputs/aix_ppc_tree \ 1791f3925e2SDavid Tenty // RUN: | FileCheck --check-prefix=CHECK-INCLUDE-LIBSTDCXX %s 1801f3925e2SDavid Tenty 1811f3925e2SDavid Tenty // CHECK-INCLUDE-LIBSTDCXX: LLVM ERROR: picking up libstdc++ headers is unimplemented on AIX 182