| 1 |
// UNSUPPORTED: system-windows |
| 2 |
|
| 3 |
// RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \ |
| 4 |
// RUN: --hip-path=%S/Inputs/hipspv %s \ |
| 5 |
// RUN: 2>&1 | FileCheck --check-prefixes=ALL,HIP-PATH %s |
| 6 |
|
| 7 |
// Test --hip-device-lib-path |
| 8 |
// RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \ |
| 9 |
// RUN: --hip-path=%S/Inputs/hipspv \ |
| 10 |
// RUN: --hip-device-lib-path=%S/Inputs/hipspv-dev-lib %s \ |
| 11 |
// RUN: 2>&1 | FileCheck --check-prefixes=ALL,HIP-DEV-LIB-PATH %s |
| 12 |
|
| 13 |
// Test --hip-device-lib w/ --hip-device-lib-path and HIP_DEVICE_LIB_PATH. |
| 14 |
// RUN: env HIP_DEVICE_LIB_PATH=%S/Inputs/hipspv-dev-lib/a \ |
| 15 |
// RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \ |
| 16 |
// RUN: --hip-path=%S/Inputs/hipspv \ |
| 17 |
// RUN: --hip-device-lib-path=%S/Inputs/hipspv-dev-lib/b \ |
| 18 |
// RUN: --hip-device-lib=a.bc --hip-device-lib=b.bc %s \ |
| 19 |
// RUN: 2>&1 | FileCheck --check-prefixes=ALL,HIP-DEV-LIB %s |
| 20 |
|
| 21 |
// ALL: {{"[^"]*clang[^"]*"}} |
| 22 |
// HIP-PATH: "-mlink-builtin-bitcode" {{".*/hipspv/lib/hip-device-lib/hipspv-spirv64.bc"}} |
| 23 |
// HIP-DEV-LIB-PATH-NOT: "-mlink-builtin-bitcode" {{".*/hipspv/lib/hip-device-lib/hipspv-spirv64.bc"}} |
| 24 |
// HIP-DEV-LIB-PATH: "-mlink-builtin-bitcode" {{".*/hipspv-dev-lib/hipspv-spirv64.bc"}} |
| 25 |
// HIP-DEV-LIB: "-mlink-builtin-bitcode" {{".*/hipspv-dev-lib/a/a.bc"}} |
| 26 |
// HIP-DEV-LIB-SAME: "-mlink-builtin-bitcode" {{".*/hipspv-dev-lib/b/b.bc"}} |