[Mlir-commits] [mlir] 0e513fc - [mlir][SPIR-V] Use ToolSubst for spirv-tools lit substitutions (#194609)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Apr 29 00:17:53 PDT 2026


Author: Arseniy Obolenskiy
Date: 2026-04-29T09:17:48+02:00
New Revision: 0e513fc6673be379581c06675fcd17e7d418c9aa

URL: https://github.com/llvm/llvm-project/commit/0e513fc6673be379581c06675fcd17e7d418c9aa
DIFF: https://github.com/llvm/llvm-project/commit/0e513fc6673be379581c06675fcd17e7d418c9aa.diff

LOG: [mlir][SPIR-V] Use ToolSubst for spirv-tools lit substitutions (#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

Added: 
    

Modified: 
    mlir/test/Target/SPIRV/lit.local.cfg

Removed: 
    


################################################################################
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