r278140 - [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.

Ismail Donmez via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 12 02:05:28 PDT 2016


Hi,

On Tue, Aug 9, 2016 at 8:27 PM, Samuel Antao via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: sfantao
> Date: Tue Aug  9 12:27:24 2016
> New Revision: 278140
>
> URL: http://llvm.org/viewvc/llvm-project?rev=278140&view=rev
> Log:
> [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.
>
> Summary: Add test to detect the C++ include paths are passed to both CUDA host and device frontends.
>
> Reviewers: tra
>
> Subscribers: cfe-commits
>
> Differential Revision: https://reviews.llvm.org/D22946
>
> Modified:
>     cfe/trunk/test/Driver/cuda-detect.cu
>
> Modified: cfe/trunk/test/Driver/cuda-detect.cu
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cuda-detect.cu?rev=278140&r1=278139&r2=278140&view=diff
> ==============================================================================
> --- cfe/trunk/test/Driver/cuda-detect.cu (original)
> +++ cfe/trunk/test/Driver/cuda-detect.cu Tue Aug  9 12:27:24 2016
> @@ -72,6 +72,11 @@
>  // RUN:   | FileCheck %s -check-prefix COMMON \
>  // RUN:     -check-prefix NOCUDAINC -check-prefix NOLIBDEVICE
>
> +// Verify that C++ include paths are passed for both host and device frontends.
> +// RUN: %clang -### -target x86_64-linux-gnu %s \
> +// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 2>&1 \
> +// RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE
> +
>  // CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA/usr/local/cuda
>  // NOCUDA-NOT: Found CUDA installation:
>
> @@ -92,3 +97,8 @@
>  // CUDAINC-SAME: "-include" "__clang_cuda_runtime_wrapper.h"
>  // NOCUDAINC-NOT: "-include" "__clang_cuda_runtime_wrapper.h"
>  // COMMON-SAME: "-x" "cuda"
> +// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda"
> +// CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
> +// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "x86_64--linux-gnu"
> +// CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
> +// CHECK-CXXINCLUDE: ld{{.*}}"

This needs -stdlib=libstdc++ otherwise it fails on hosts defaulting to libc++.

ismail


More information about the cfe-commits mailing list