Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 1 | // REQUIRES: clang-driver |
| 2 | // REQUIRES: x86-registered-target |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 3 | // REQUIRES: nvptx-registered-target |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 4 | // |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 5 | // Check that we properly detect CUDA installation. |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 6 | // RUN: %clang -v --target=i386-unknown-linux \ |
Jonas Hahnfeld | 7f9c518 | 2018-01-31 08:26:51 +0000 | [diff] [blame] | 7 | // RUN: --sysroot=%S/no-cuda-there --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 8 | // RUN: %clang -v --target=i386-apple-macosx \ |
Jonas Hahnfeld | 7f9c518 | 2018-01-31 08:26:51 +0000 | [diff] [blame] | 9 | // RUN: --sysroot=%S/no-cuda-there --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
| 10 | // RUN: %clang -v --target=x86_64-unknown-linux \ |
| 11 | // RUN: --sysroot=%S/no-cuda-there --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
| 12 | // RUN: %clang -v --target=x86_64-apple-macosx \ |
| 13 | // RUN: --sysroot=%S/no-cuda-there --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
| 14 | |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 15 | |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 16 | // RUN: %clang -v --target=i386-unknown-linux \ |
Jiading Gai | 664dd75 | 2018-09-26 07:07:48 +0000 | [diff] [blame] | 17 | // RUN: --sysroot=%S/Inputs/CUDA --cuda-path-ignore-env 2>&1 | FileCheck %s |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 18 | // RUN: %clang -v --target=i386-apple-macosx \ |
Jiading Gai | 664dd75 | 2018-09-26 07:07:48 +0000 | [diff] [blame] | 19 | // RUN: --sysroot=%S/Inputs/CUDA --cuda-path-ignore-env 2>&1 | FileCheck %s |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 20 | |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 21 | // RUN: %clang -v --target=i386-unknown-linux \ |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 22 | // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 | FileCheck %s |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 23 | // RUN: %clang -v --target=i386-apple-macosx \ |
| 24 | // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 | FileCheck %s |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 25 | |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 26 | // Check that we don't find a CUDA installation without libdevice ... |
| 27 | // RUN: %clang -v --target=i386-unknown-linux \ |
Jonas Hahnfeld | 7f9c518 | 2018-01-31 08:26:51 +0000 | [diff] [blame] | 28 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 29 | // RUN: %clang -v --target=i386-apple-macosx \ |
Jonas Hahnfeld | 7f9c518 | 2018-01-31 08:26:51 +0000 | [diff] [blame] | 30 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
| 31 | // RUN: %clang -v --target=x86_64-unknown-linux \ |
| 32 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
| 33 | // RUN: %clang -v --target=x84_64-apple-macosx \ |
| 34 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 35 | |
| 36 | // ... unless the user doesn't need libdevice |
| 37 | // RUN: %clang -v --target=i386-unknown-linux -nocudalib \ |
Jonas Hahnfeld | 7f9c518 | 2018-01-31 08:26:51 +0000 | [diff] [blame] | 38 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NO-LIBDEVICE |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 39 | // RUN: %clang -v --target=i386-apple-macosx -nocudalib \ |
Jonas Hahnfeld | 7f9c518 | 2018-01-31 08:26:51 +0000 | [diff] [blame] | 40 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NO-LIBDEVICE |
| 41 | // RUN: %clang -v --target=x86_64-unknown-linux -nocudalib \ |
| 42 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NO-LIBDEVICE |
| 43 | // RUN: %clang -v --target=x86_64-apple-macosx -nocudalib \ |
| 44 | // RUN: --sysroot=%S/Inputs/CUDA-nolibdevice --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NO-LIBDEVICE |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 45 | |
| 46 | |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 47 | // Make sure we map libdevice bitcode files to proper GPUs. These |
| 48 | // tests use Inputs/CUDA_80 which has full set of libdevice files. |
| 49 | // However, libdevice mapping only matches CUDA-7.x at the moment. |
| 50 | // sm_2x, sm_32 -> compute_20 |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 51 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_21 \ |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 52 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 53 | // RUN: | FileCheck %s -check-prefix COMMON \ |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 54 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE20 |
| 55 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_32 \ |
| 56 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
| 57 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 58 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE20 |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 59 | // sm_30, sm_6x map to compute_30. |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 60 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_30 \ |
| 61 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
| 62 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 63 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE30 |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 64 | // sm_5x is a special case. Maps to compute_30 for cuda-7.x only. |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 65 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_50 \ |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 66 | // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 67 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 68 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE30 |
| 69 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_60 \ |
| 70 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
| 71 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 72 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE30 |
| 73 | // sm_35 and sm_37 -> compute_35 |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 74 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 75 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 76 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix CUDAINC \ |
| 77 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE35 |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 78 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_37 \ |
| 79 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
| 80 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix CUDAINC \ |
| 81 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE35 |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 82 | // sm_5x -> compute_50 for CUDA-8.0 and newer. |
| 83 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_50 \ |
| 84 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
| 85 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 86 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE50 |
| 87 | |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 88 | // Verify that -nocudainc prevents adding include path to CUDA headers. |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 89 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ |
| 90 | // RUN: -nocudainc --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 91 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOCUDAINC \ |
| 92 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE35 |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 93 | // RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ |
| 94 | // RUN: -nocudainc --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
| 95 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOCUDAINC \ |
| 96 | // RUN: -check-prefix LIBDEVICE -check-prefix LIBDEVICE35 |
| 97 | |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 98 | // We should not add any CUDA include paths if there's no valid CUDA installation |
| 99 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ |
| 100 | // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ |
| 101 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOCUDAINC |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 102 | // RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ |
| 103 | // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ |
| 104 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOCUDAINC |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 105 | |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 106 | // Verify that we get an error if there's no libdevice library to link with. |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 107 | // NOTE: Inputs/CUDA deliberately does *not* have libdevice.compute_20 for this purpose. |
| 108 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_20 \ |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 109 | // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 110 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix MISSINGLIBDEVICE |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 111 | // RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_20 \ |
| 112 | // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
| 113 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix MISSINGLIBDEVICE |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 114 | |
| 115 | // Verify that -nocudalib prevents linking libdevice bitcode in. |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 116 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ |
| 117 | // RUN: -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
| 118 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOLIBDEVICE |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 119 | // RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ |
| 120 | // RUN: -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
| 121 | // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOLIBDEVICE |
| 122 | |
Artem Belevich | 8601733 | 2015-11-17 22:28:55 +0000 | [diff] [blame] | 123 | // Verify that we don't add include paths, link with libdevice or |
Artem Belevich | 7fda3c9 | 2015-12-16 18:51:59 +0000 | [diff] [blame] | 124 | // -include __clang_cuda_runtime_wrapper.h without valid CUDA installation. |
Artem Belevich | 8601733 | 2015-11-17 22:28:55 +0000 | [diff] [blame] | 125 | // RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ |
| 126 | // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ |
| 127 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 128 | // RUN: -check-prefix NOCUDAINC -check-prefix NOLIBDEVICE |
Justin Lebar | 66c4fd7 | 2016-11-18 00:41:22 +0000 | [diff] [blame] | 129 | // RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ |
| 130 | // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ |
| 131 | // RUN: | FileCheck %s -check-prefix COMMON \ |
| 132 | // RUN: -check-prefix NOCUDAINC -check-prefix NOLIBDEVICE |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 133 | |
Samuel Antao | 3be8801 | 2016-08-09 17:27:24 +0000 | [diff] [blame] | 134 | // Verify that C++ include paths are passed for both host and device frontends. |
Benjamin Kramer | a203c41 | 2016-08-09 19:20:25 +0000 | [diff] [blame] | 135 | // RUN: %clang -### -no-canonical-prefixes -target x86_64-linux-gnu %s \ |
Samuel Antao | 8de34a9 | 2016-08-16 14:38:39 +0000 | [diff] [blame] | 136 | // RUN: --stdlib=libstdc++ --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 \ |
| 137 | // RUN: --gcc-toolchain="" 2>&1 \ |
Samuel Antao | 3be8801 | 2016-08-09 17:27:24 +0000 | [diff] [blame] | 138 | // RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE |
| 139 | |
Artem Belevich | 8fa28a0 | 2019-01-31 21:32:24 +0000 | [diff] [blame] | 140 | // Verify that CUDA SDK version is propagated to the CC1 compilations. |
| 141 | // RUN: %clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=sm_50 \ |
| 142 | // RUN: --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ |
| 143 | // RUN: | FileCheck %s -check-prefix CUDA80 |
| 144 | |
| 145 | // Verify that if no version file is found, we report the default of 7.0. |
| 146 | // RUN: %clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=sm_50 \ |
| 147 | // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
| 148 | // RUN: | FileCheck %s -check-prefix CUDA70 |
| 149 | |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 150 | // CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA/usr/local/cuda |
Jonas Hahnfeld | e2c342f | 2017-10-16 13:31:30 +0000 | [diff] [blame] | 151 | // NO-LIBDEVICE: Found CUDA installation: {{.*}}/Inputs/CUDA-nolibdevice/usr/local/cuda |
Artem Belevich | 98607b6 | 2015-09-23 21:49:39 +0000 | [diff] [blame] | 152 | // NOCUDA-NOT: Found CUDA installation: |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 153 | |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 154 | // MISSINGLIBDEVICE: error: cannot find libdevice for sm_20. |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 155 | |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 156 | // COMMON: "-triple" "nvptx-nvidia-cuda" |
| 157 | // COMMON-SAME: "-fcuda-is-device" |
Matt Arsenault | a13746b | 2018-08-20 18:16:48 +0000 | [diff] [blame] | 158 | // LIBDEVICE-SAME: "-mlink-builtin-bitcode" |
| 159 | // NOLIBDEVICE-NOT: "-mlink-builtin-bitcode" |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 160 | // LIBDEVICE20-SAME: libdevice.compute_20.10.bc |
| 161 | // LIBDEVICE30-SAME: libdevice.compute_30.10.bc |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 162 | // LIBDEVICE35-SAME: libdevice.compute_35.10.bc |
Artem Belevich | d4d9dc8 | 2016-09-28 17:47:40 +0000 | [diff] [blame] | 163 | // LIBDEVICE50-SAME: libdevice.compute_50.10.bc |
Artem Belevich | 34f481a | 2015-11-17 22:28:50 +0000 | [diff] [blame] | 164 | // NOLIBDEVICE-NOT: libdevice.compute_{{.*}}.bc |
| 165 | // LIBDEVICE-SAME: "-target-feature" "+ptx42" |
| 166 | // NOLIBDEVICE-NOT: "-target-feature" "+ptx42" |
Artem Belevich | 02a1e97 | 2016-08-02 23:12:51 +0000 | [diff] [blame] | 167 | // CUDAINC-SAME: "-internal-isystem" "{{.*}}/Inputs/CUDA{{[_0-9]+}}/usr/local/cuda/include" |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 168 | // NOCUDAINC-NOT: "-internal-isystem" "{{.*}}/cuda/include" |
Artem Belevich | 7fda3c9 | 2015-12-16 18:51:59 +0000 | [diff] [blame] | 169 | // CUDAINC-SAME: "-include" "__clang_cuda_runtime_wrapper.h" |
| 170 | // NOCUDAINC-NOT: "-include" "__clang_cuda_runtime_wrapper.h" |
Justin Lebar | 9421ba6 | 2016-08-15 20:38:52 +0000 | [diff] [blame] | 171 | // -internal-externc-isystem flags must come *after* the cuda include flags, |
| 172 | // because we must search the cuda include directory first. |
| 173 | // CUDAINC-SAME: "-internal-externc-isystem" |
Artem Belevich | fa11ab5 | 2015-11-17 22:28:46 +0000 | [diff] [blame] | 174 | // COMMON-SAME: "-x" "cuda" |
Samuel Antao | 3be8801 | 2016-08-09 17:27:24 +0000 | [diff] [blame] | 175 | // CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda" |
| 176 | // CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8" |
Petr Hosek | 7b27454 | 2018-08-08 22:23:57 +0000 | [diff] [blame] | 177 | // CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "x86_64-unknown-linux-gnu" |
Samuel Antao | 3be8801 | 2016-08-09 17:27:24 +0000 | [diff] [blame] | 178 | // CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8" |
| 179 | // CHECK-CXXINCLUDE: ld{{.*}}" |
Artem Belevich | 8fa28a0 | 2019-01-31 21:32:24 +0000 | [diff] [blame] | 180 | |
Eric Liu | f4b19c0 | 2019-02-01 11:36:23 +0000 | [diff] [blame^] | 181 | // CUDA80: "-cc1" "-triple" "nvptx64-nvidia-cuda" |
Artem Belevich | 8fa28a0 | 2019-01-31 21:32:24 +0000 | [diff] [blame] | 182 | // CUDA80-SAME: -target-sdk-version=8.0 |
Eric Liu | f4b19c0 | 2019-02-01 11:36:23 +0000 | [diff] [blame^] | 183 | // CUDA80: "-cc1" "-triple" "x86_64-unknown-linux-gnu" |
Artem Belevich | 8fa28a0 | 2019-01-31 21:32:24 +0000 | [diff] [blame] | 184 | // CUDA80-SAME: -target-sdk-version=8.0 |
| 185 | // CUDA80: ld{{.*}}" |
| 186 | |
Eric Liu | f4b19c0 | 2019-02-01 11:36:23 +0000 | [diff] [blame^] | 187 | // CUDA70: "-cc1" "-triple" "nvptx64-nvidia-cuda" |
Artem Belevich | 8fa28a0 | 2019-01-31 21:32:24 +0000 | [diff] [blame] | 188 | // CUDA70-SAME: -target-sdk-version=7.0 |
Eric Liu | f4b19c0 | 2019-02-01 11:36:23 +0000 | [diff] [blame^] | 189 | // CUDA70: "-cc1" "-triple" "x86_64-unknown-linux-gnu" |
Artem Belevich | 8fa28a0 | 2019-01-31 21:32:24 +0000 | [diff] [blame] | 190 | // CUDA70-SAME: -target-sdk-version=7.0 |
| 191 | // CUDA70: ld{{.*}}" |