[clang] [Clang] diagnosing missing Vulkan environment when using SPIR-V triple (PR #190840)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 17 05:48:37 PDT 2026


================
@@ -0,0 +1,7 @@
+// RUN: not %clang -target spirv %s 2>&1 | FileCheck %s --check-prefix=CHECK-VULKAN
+// RUN: not %clang -target spirv-vulkan-mlibc %s 2>&1 | FileCheck %s --check-prefix=CHECK-SHADER
----------------
AaronBallman wrote:

```suggestion
// RUN: not %clang_cc1 -target spirv %s 2>&1 | FileCheck %s --check-prefix=CHECK-VULKAN
// RUN: not %clang_cc1 -target spirv-vulkan-mlibc %s 2>&1 | FileCheck %s --check-prefix=CHECK-SHADER
```
You should be running clang -cc1 instead of clang.

Should this be using `-target` instead of `-triple` or does it not matter, @MaskRay?

https://github.com/llvm/llvm-project/pull/190840


More information about the cfe-commits mailing list