https://github.com/statham-arm created https://github.com/llvm/llvm-project/pull/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. >From e5b90488cdb8b2d8865c3ce434bd1adba16e0992 Mon Sep 17 00:00:00 2001 From: Simon Tatham <simon.tat...@arm.com> Date: Tue, 24 Oct 2023 15:52:38 +0100 Subject: [PATCH] [Driver] Add `--` to some test clang-cl command lines. 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. --- clang/test/Driver/cl-offload.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/Driver/cl-offload.cu b/clang/test/Driver/cl-offload.cu index 650c13da15b5b58..eaa4b58afa8878b 100644 --- a/clang/test/Driver/cl-offload.cu +++ b/clang/test/Driver/cl-offload.cu @@ -5,11 +5,11 @@ // 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