[Mlir-commits] [mlir] [mlir][SPIR-V] Use ToolSubst for spirv-tools lit substitutions (PR #194609)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 28 05:56:57 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-spirv
Author: Arseniy Obolenskiy (aobolensk)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/194609.diff
1 Files Affected:
- (modified) mlir/test/Target/SPIRV/lit.local.cfg (+2-2)
``````````diff
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"])
``````````
</details>
https://github.com/llvm/llvm-project/pull/194609
More information about the Mlir-commits
mailing list