Default to using in-tree clang for building test executables
Summary:
Using the in-tree clang should be the default test configuration as that
is the one compiler that we can be sure everyone has (better
reproducibility of test results). Also, it should hopefully reduce the
impact of pr35040.
This also reduces the number of settings which control the compiler
used. LLDB_TEST_C_COMPILER is used for C files and
LLDB_TEST_CXX_COMPILER for C++ files. Both of the settings default to
the in-tree clang.
The reason for that is that before the patch the LLDB_TEST_C_COMPILER
variable was used for a different purpose (and usually empty), where
as now it's set by default to the in-tree clang. However, cmake will
not overwrite the cached value by design. (I could have worked around
that in cmake, but I only noticed that issue after landing the
change.)
Erasing the build folder should let the new and correct default kick
in. If you run the check-lldb target then it will now use the in-tree
clang instead of the system compiler for using tests.
In general, please try to structure changes so that CMake cache clobbers aren’t necessary. If you introduce changes that require clobbers by accident, consider adding some temporary CMake logic to help buildbots recover on their own. Some temporary CMake hacks can save a lot of time across all the folks that have to discover and debug this problem.