[clang] 74085eb - [llvm] [lit] Move %clang_dxc substitution from clang/test
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 29 12:00:31 PDT 2022
Author: Michał Górny
Date: 2022-09-29T20:59:00+02:00
New Revision: 74085ebfb68e067ba6c21722ac02d2ffbb42a00c
URL: https://github.com/llvm/llvm-project/commit/74085ebfb68e067ba6c21722ac02d2ffbb42a00c
DIFF: https://github.com/llvm/llvm-project/commit/74085ebfb68e067ba6c21722ac02d2ffbb42a00c.diff
LOG: [llvm] [lit] Move %clang_dxc substitution from clang/test
Move the `%clang_dxc` substitution from local definition in clang/test
to lit's `llvm/config.py` module where all other driver definitions
are found. This improves consistency and makes it easier to control
global clang options.
Differential Revision: https://reviews.llvm.org/D134871
Added:
Modified:
clang/test/lit.cfg.py
llvm/utils/lit/lit/llvm/config.py
Removed:
################################################################################
diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index 3fb88c3c7ef8..590b73a70257 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -63,8 +63,6 @@
'clang-tblgen', 'clang-scan-deps', 'opt', 'llvm-ifs', 'yaml2obj', 'clang-linker-wrapper',
ToolSubst('%clang_extdef_map', command=FindTool(
'clang-extdef-mapping'), unresolved='ignore'),
- ToolSubst('%clang_dxc', command=config.clang,
- extra_args=['--driver-mode=dxc']),
]
if config.clang_examples:
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index 591b9938f211..fdf2cc127def 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -544,6 +544,8 @@ def use_clang(self, additional_tool_dirs=[], additional_flags=[],
extra_args=['--driver-mode=cpp']+additional_flags),
ToolSubst('%clang_cl', command=self.config.clang,
extra_args=['--driver-mode=cl']+additional_flags),
+ ToolSubst('%clang_dxc', command=self.config.clang,
+ extra_args=['--driver-mode=dxc']+additional_flags),
ToolSubst('%clangxx', command=self.config.clang,
extra_args=['--driver-mode=g++']+additional_flags),
]
More information about the cfe-commits
mailing list