From: Michał Górny Date: Thu, 29 Sep 2022 18:58:43 +0000 (+0200) Subject: [llvm] [lit] Move %clang_dxc substitution from clang/test X-Git-Tag: upstream/17.0.6~32076 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74085ebfb68e067ba6c21722ac02d2ffbb42a00c;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py index 3fb88c3..590b73a 100644 --- a/clang/test/lit.cfg.py +++ b/clang/test/lit.cfg.py @@ -63,8 +63,6 @@ tools = [ '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 591b993..fdf2cc1 100644 --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -544,6 +544,8 @@ class LLVMConfig(object): 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), ]