This is modeled after the clang and llvm lit tests.
Several properties have CMAKE_CFG_INTDIR as part of the path - this works correctly when the cmake generator only supports one configuration which is known at configuration time, but it does not work correctly when the cmake generator supports multiple configurations (for example, VS).
For VS, CMAKE_CFG_INTDIR ends up set as $Configuration and then it is never updated correctly. Instead, the lit configuration can use a property that can be overwritten at run time. AddLLVM does that for several properties (such as LLVM_TOOLS_DIR).
This change is also removing properties from the lit/CMakeLists.txt that are actually set during the call to configure_lit_site_cfg
This only works if you're using a just-built clang, which might not be the case. In fact, it's usually not the case, because it's common to want to run the test suite against a debug build of lldb but using a release build of clang (otherwise you'll be there all day waiting for it to finish).
I feel like if the user specifies an absolute path to the test compiler on the command line, that should be what it uses -- always. If we want to use a just built toolchain, maybe we need something else, like -DLLDB_TEST_BUILT_CLANG=ON, which would trigger this logic.
As I don't use this configuration though, I'm interested in hearing your thoughts.