[clang] [Driver][HIP/SPIRV] Fix crash when llvm-link is executed. (PR #196074)
Marcos Maronas via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 07:19:58 PDT 2026
================
@@ -0,0 +1,16 @@
+// Verify that SPIR-V compilation does not crash during the llvm-link step
+// due to extra args that are not meant to be forwarded there.
+//
+// RUN: %clang -### --target=spirv64-amd-amdhsa -use-spirv-backend \
+// RUN: -Xlinker -opt-bisect-limit=-1 %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-LINKER-OPT
+//
+// RUN: %clang -### --target=spirv64-amd-amdhsa -use-spirv-backend \
+// RUN: -Xlinker -mllvm -Xlinker -opt-bisect-limit=-1 %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-LINKER-MLLVM
+//
+// CHECK-LINKER-OPT: "{{.*}}llvm-link"
+// CHECK-LINKER-OPT-SAME: "-o" "{{.*}}" "{{.*}}"{{$}}
----------------
maarquitos14 wrote:
The check seems a little bit vague. What do we want to check exactly? That some flags are present? That some flags are NOT present? It's unclear to me.
Same applies for the next case as well.
https://github.com/llvm/llvm-project/pull/196074
More information about the cfe-commits
mailing list