Skip to content

Commit 9ae11a5

Browse files
authored
[Driver] Add -- to some test clang-cl command lines. (#70055)
If clang/test/Driver/cl-offload.cu is run on Unix in a directory whose absolute pathname starts with `/w`, such as the `/workspace` used by at least some Jenkins CI setups, then the file name on the clang command line is misinterpreted as some kind of MSVC warning-control option, and ignored by the catch-all `_SLASH_w` option in Options.td. Other clang-cl tests take care to put a `--` before the input file name, to force clang to treat it as a filename even if it starts with a / and accidentally looks like a cl option. Do the same here.
1 parent b6b0756 commit 9ae11a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/test/Driver/cl-offload.cu

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
// REQUIRES: !system-darwin
21
// REQUIRES: !system-solaris
32

43
// The test cannot be run on Darwin because /Users will be treated as a MSVC option.
54

65
// RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=sm_35 -fgpu-rdc \
76
// RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
8-
// RUN: /Wall -x cuda %s 2>&1 \
7+
// RUN: /Wall -x cuda -- %s 2>&1 \
98
// RUN: | FileCheck %s -check-prefix=CUDA
109

1110
// RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=gfx1010 -fgpu-rdc --hip-link \
12-
// RUN: --rocm-path=%S/Inputs/rocm /Wall -x hip %s 2>&1 \
11+
// RUN: --rocm-path=%S/Inputs/rocm /Wall -x hip -- %s 2>&1 \
1312
// RUN: | FileCheck %s -check-prefix=HIP
1413

1514
// CUDA: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"

0 commit comments

Comments
 (0)