brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · ce42ed7 Raw
81 lines · plain
1// This tests uses the PATH environment variable.2// REQUIRES: !system-windows, !system-cygwin3 4// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \5// RUN:    %clang -v --target=i386-unknown-linux --sysroot=%S/no-cuda-there \6// RUN:    2>&1 | FileCheck %s7// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \8// RUN:    %clang -v --target=i386-apple-macosx --sysroot=%S/no-cuda-there \9// RUN:    2>&1 | FileCheck %s10// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \11// RUN:    %clang -v --target=x86_64-unknown-linux --sysroot=%S/no-cuda-there \12// RUN:    2>&1 | FileCheck %s13// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \14// RUN:    %clang -v --target=x86_64-apple-macosx --sysroot=%S/no-cuda-there \15// RUN:    2>&1 | FileCheck %s16 17 18// Check that we follow ptxas binaries that are symlinks.19// RUN: env PATH=%S/Inputs/CUDA-symlinks/usr/bin \20// RUN:    %clang -v --target=i386-unknown-linux --sysroot=%S/no-cuda-there \21// RUN:    2>&1 | FileCheck %s --check-prefix SYMLINKS22// RUN: env PATH=%S/Inputs/CUDA-symlinks/usr/bin \23// RUN:    %clang -v --target=i386-apple-macosx --sysroot=%S/no-cuda-there \24// RUN:    2>&1 | FileCheck %s --check-prefix SYMLINKS25// RUN: env PATH=%S/Inputs/CUDA-symlinks/usr/bin \26// RUN:    %clang -v --target=x86_64-unknown-linux --sysroot=%S/no-cuda-there \27// RUN:    2>&1 | FileCheck %s --check-prefix SYMLINKS28// RUN: env PATH=%S/Inputs/CUDA-symlinks/usr/bin \29// RUN:    %clang -v --target=x86_64-apple-macosx --sysroot=%S/no-cuda-there \30// RUN:    2>&1 | FileCheck %s --check-prefix SYMLINKS31 32 33// We only take a CUDA installation from PATH if it contains libdevice.34// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \35// RUN:    %clang -v --target=i386-unknown-linux --sysroot=%S/no-cuda-there \36// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA37// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \38// RUN:    %clang -v --target=i386-apple-macosx --sysroot=%S/no-cuda-there \39// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA40// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \41// RUN:    %clang -v --target=x86_64-unknown-linux --sysroot=%S/no-cuda-there \42// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA43// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \44// RUN:    %clang -v --target=x86_64-apple-macosx --sysroot=%S/no-cuda-there \45// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA46 47// We even require libdevice if -nocudalib is passed to avoid false positives48// if the distribution merges CUDA into /usr and ptxas ends up /usr/bin.49// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \50// RUN:    %clang -v --target=i386-unknown-linux --sysroot=%S/no-cuda-there -nocudalib \51// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA52// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \53// RUN:    %clang -v --target=i386-apple-macosx --sysroot=%S/no-cuda-there -nocudalib \54// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA55// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \56// RUN:    %clang -v --target=x86_64-unknown-linux --sysroot=%S/no-cuda-there -nocudalib \57// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA58// RUN: env PATH=%S/Inputs/CUDA-nolibdevice/usr/local/cuda/bin \59// RUN:    %clang -v --target=x86_64-apple-macosx --sysroot=%S/no-cuda-there -nocudalib \60// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA61 62 63// Check that the CUDA installation in PATH is not taken when passing64// the option --cuda-path-ignore-env.65// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \66// RUN:    %clang -v --target=i386-unknown-linux --sysroot=%S/no-cuda-there --cuda-path-ignore-env \67// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA68// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \69// RUN:    %clang -v --target=i386-apple-macosx --sysroot=%S/no-cuda-there --cuda-path-ignore-env \70// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA71// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \72// RUN:    %clang -v --target=x86_64-unknown-linux --sysroot=%S/no-cuda-there --cuda-path-ignore-env \73// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA74// RUN: env PATH=%S/Inputs/CUDA/usr/local/cuda/bin \75// RUN:    %clang -v --target=x86_64-apple-macosx --sysroot=%S/no-cuda-there --cuda-path-ignore-env \76// RUN:    2>&1 | FileCheck %s --check-prefix NOCUDA77 78// CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA/usr/local/cuda79// SYMLINKS: Found CUDA installation: {{.*}}/Inputs/CUDA-symlinks/opt/cuda80// NOCUDA-NOT: Found CUDA installation:81