[mlir][SPIR-V] Use ToolSubst for spirv-tools lit substitutions#194609
Merged
Conversation
Bare-string substitutions match as substrings and the replacement path contains the tool name, causing corrupted RUN lines Mirrors the LLVM-side fix from llvm#192462
Member
|
@llvm/pr-subscribers-mlir @llvm/pr-subscribers-mlir-spirv Author: Arseniy Obolenskiy (aobolensk) ChangesBare-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:
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"])
|
davidegrohmann
approved these changes
Apr 29, 2026
kuhar
reviewed
Apr 29, 2026
| 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 |
Member
There was a problem hiding this comment.
do we also need to fix it on the llvm/clang side?
Contributor
Author
kirthana14m
pushed a commit
to ROCm/llvm-project
that referenced
this pull request
Apr 30, 2026
…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 llvm#192462
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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