[llvm] [bazel][mlir][test] Skip MathToXeVM when SPIRV is not enabled (PR #163491)

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 14 21:15:03 PDT 2025


https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/163491

This passes buildkite CI, but fails downstream if the SPIRV target is not enabled.

This is needed after #162934

>From b749be726d661ee76322683422986ab2b9be9f03 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Tue, 14 Oct 2025 21:12:07 -0700
Subject: [PATCH] [bazel][mlir][test] Skip MathToXeVM when SPIRV is not enabled

---
 .../llvm-project-overlay/mlir/test/Conversion/BUILD.bazel   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/utils/bazel/llvm-project-overlay/mlir/test/Conversion/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/Conversion/BUILD.bazel
index b00e8f243c29a..d8fcb5360d26b 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/Conversion/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/Conversion/BUILD.bazel
@@ -1,4 +1,5 @@
 load("//llvm:lit_test.bzl", "lit_test")
+load("//llvm:targets.bzl", "llvm_targets")
 
 licenses(["notice"])
 
@@ -15,6 +16,9 @@ package(default_visibility = ["//visibility:public"])
     )
     for src in glob(
         include = ["**/*.mlir"],
-        exclude = ["GPUToROCm/lower-rocdl-kernel-to-hsaco.mlir"],
+        exclude = ["GPUToROCm/lower-rocdl-kernel-to-hsaco.mlir"] + (
+            # MathToXeVM needs SPIRV; see MathToXeVM/lit.local.cfg
+            ["MathToXeVM/**"] if "SPIRV" not in llvm_targets else []
+        ),
     )
 ]



More information about the llvm-commits mailing list