[Mlir-commits] [mlir] [mlir][SPIR-V] Use ToolSubst for spirv-tools lit substitutions (PR #194609)
Arseniy Obolenskiy
llvmlistbot at llvm.org
Tue Apr 28 05:56:16 PDT 2026
https://github.com/aobolensk created https://github.com/llvm/llvm-project/pull/194609
Bare-string substitutions match as substrings and the replacement path contains the tool name, causing corrupted RUN lines
Mirrors the LLVM-side fix from #192462
>From e95fd1ff7012d2aa184d73b868b6ceb657b7e830 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Tue, 28 Apr 2026 14:47:07 +0200
Subject: [PATCH] [mlir][SPIR-V] Use ToolSubst for spirv-tools lit
substitutions
Bare-string substitutions match as substrings and the replacement path contains the tool name, causing corrupted RUN lines
Mirrors the LLVM-side fix from #192462
---
mlir/test/Target/SPIRV/lit.local.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/test/Target/SPIRV/lit.local.cfg b/mlir/test/Target/SPIRV/lit.local.cfg
index 6d44394c8cd4f..9d158cf82b5be 100644
--- a/mlir/test/Target/SPIRV/lit.local.cfg
+++ b/mlir/test/Target/SPIRV/lit.local.cfg
@@ -1,4 +1,4 @@
if config.spirv_tools_tests:
config.available_features.add("spirv-tools")
- config.substitutions.append(("spirv-as", os.path.join(config.llvm_tools_dir, "spirv-as")))
- config.substitutions.append(("spirv-val", os.path.join(config.llvm_tools_dir, "spirv-val")))
+ from lit.llvm import llvm_config
+ llvm_config.add_tool_substitutions(["spirv-as", "spirv-val"])
More information about the Mlir-commits
mailing list