Author: Simon Tatham Date: 2023-10-25T08:27:06+01:00 New Revision: 9ae11a5bacb781f6899861ab2197a8cd711c5e6c
URL: https://github.com/llvm/llvm-project/commit/9ae11a5bacb781f6899861ab2197a8cd711c5e6c DIFF: https://github.com/llvm/llvm-project/commit/9ae11a5bacb781f6899861ab2197a8cd711c5e6c.diff LOG: [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. Added: Modified: clang/test/Driver/cl-offload.cu Removed: ################################################################################ diff --git a/clang/test/Driver/cl-offload.cu b/clang/test/Driver/cl-offload.cu index 650c13da15b5b58..b05bf3b97b7eb71 100644 --- a/clang/test/Driver/cl-offload.cu +++ b/clang/test/Driver/cl-offload.cu @@ -1,15 +1,14 @@ -// REQUIRES: !system-darwin // REQUIRES: !system-solaris // The test cannot be run on Darwin because /Users will be treated as a MSVC option. // RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=sm_35 -fgpu-rdc \ // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ -// RUN: /Wall -x cuda %s 2>&1 \ +// RUN: /Wall -x cuda -- %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=CUDA // RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=gfx1010 -fgpu-rdc --hip-link \ -// RUN: --rocm-path=%S/Inputs/rocm /Wall -x hip %s 2>&1 \ +// RUN: --rocm-path=%S/Inputs/rocm /Wall -x hip -- %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=HIP // CUDA: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits