[Lldb-commits] [PATCH] D39215: Default to using in-tree clang for building test executables

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 23 16:52:33 PDT 2017


labath added a comment.

In https://reviews.llvm.org/D39215#904536, @labath wrote:

> In https://reviews.llvm.org/D39215#904510, @zturner wrote:
>
> > There is already a CMake variable called `LLDB_TEST_COMPILER`.  This `LLDB_TEST_CLANG` was introduced later, I guess unaware of the presence of `LLDB_TEST_COMPILER`.  Would it be possible to standardize on one variable?  This would also mean deleting the `TEST_C_COMPILER` and TEST_CXX_COMPILER` variables.  I don't see why we should ever have both.  Run the test suite a second time if you need to test with different C and C++ compilers.
>
>
> Unlike msvc, where you just use CL to compile everything, on ***nix you have different compiler drivers for C (gcc, clang) and C++ (g++, clang++). The differences are minute, but we still need both (clang has --driver-mode=g++ argument to emulate g++, but I don't know of any gcc option like that).
>
> However, I do see a bit of space for simplification. I can remove LLDB_TEST_CLANG altogether, and just have LLDB_TEST_???_COMPILER default to clang.


Scratch that, dotest.py already has some magic to compute the c++ compiler, given the c version, so I guess one variable is really enough.


https://reviews.llvm.org/D39215





More information about the lldb-commits mailing list