[clang][lit] Allow test cases to use the compiler that are used to compile Clang
authorElla Ma <alansnape3058@gmail.com>
Wed, 24 Mar 2021 10:32:57 +0000 (11:32 +0100)
committerBalazs Benics <balazsbenics@sigmatechnology.se>
Wed, 24 Mar 2021 10:32:57 +0000 (11:32 +0100)
commit1d8fc086ae26a1f973b25387b5063f1e801dc0f7
treecc923b3e578f5629deffd97c42775d95f1b61435
parent760f4c2069d53ace13d20424b7209759a9186090
[clang][lit] Allow test cases to use the compiler that are used to compile Clang

Required by D83660.
Test cases may want to use the host compiler to compile some mocks for the
test case.

This patch adds two substitutions `%host_cc` and `%host_cxx` to use the host
compilers set via variable `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER`.

Patch by Ella Ma!

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D98918
clang/test/lit.cfg.py
clang/test/lit.site.cfg.py.in