[clang] 84e806d - [clang][lit] set spirv-tools feature when tools are available (#203067)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 12:03:27 PDT 2026
Author: Tim Corringham
Date: 2026-06-10T19:03:20Z
New Revision: 84e806d259626d79ae20ebd76e5fb0fed34ef7c0
URL: https://github.com/llvm/llvm-project/commit/84e806d259626d79ae20ebd76e5fb0fed34ef7c0
DIFF: https://github.com/llvm/llvm-project/commit/84e806d259626d79ae20ebd76e5fb0fed34ef7c0.diff
LOG: [clang][lit] set spirv-tools feature when tools are available (#203067)
When the spirv tools are available (e.g. built with
-DLLVM_INCLUDE_SPIRV_TOOLS_TESTS) register the spirv-tools lit feature
in clang/test/lit.cfg.py.
This can then be used to skip tests that are not applicable when these
tools are available.
Fixes: #203049
Co-authored-by: Tim Corringham <tcorring at amd.com>
Added:
Modified:
clang/test/lit.cfg.py
Removed:
################################################################################
diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index fbf92e500975f..dc0d87f0a29a1 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -285,6 +285,10 @@ def have_host_clang_repl_cuda():
if lit.util.which("spirv-val", config.llvm_tools_dir):
config.available_features.add("spirv-val")
+# SPIRV-Tools availability (e.g. built with -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS)
+if config.spirv_tools_tests:
+ config.available_features.add("spirv-tools")
+
llvm_config.add_tool_substitutions(tools, tool_dirs)
config.substitutions.append(
More information about the cfe-commits
mailing list