Allow to run the test suite when building LLDB Standalone with Xcode against a provided LLVM build-tree that used a single-configuration generator like Ninja.
So far both test drivers, lit-based `check-lldb` as well as `lldb-dotest`, were looking for test dependencies (clang/dsymutil/etc.) in a subdirectory with the configuration name (Debug/Release/etc.). It was implicitly assuming that the provided LLVM build-tree was also built with a multi-configuration generator (Xcode/VisualStudio). In practice, howeverboth, the opposite is more common: builLLDB and the dependencies with Ninja anprovided LLDB with Xcode for developmentVM used the same generator. With this patch it becomes the default.
I think this will also work with Visual StudioIn practice, but kept the Xcode restriction because I didn't test it.however, I am happy to relax the condition,the opposite is quite common: build the dependencies with Ninja and LLDB with Xcode for development*. once someone can confirm it worksWith this patch it becomes the default.
If necessary I can add an option to enable this feature, like `LLDB_PROVIDED_NINJA_BUILD_TREE=On`.(* In fact, What do you think?
Otherwise,it turned out that the Xcode<->Xcode variant didn't even build out of the box. is there any other use-case I missed or you want to be considered?It's fixed since D62879)
Once this is sound, I'm planning the following steps:
* add stage to the [lldb-cmake-standalone bot](http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-standalone/) to build and test it
* update the `Building LLDB with Xcode` section in the docs
* bring the same mechanism to swift-lldb
* fade out the manually maintained Xcode project
On macOS build and test like this:
$ git clone https://github.com/llvm/llvm-project.git /path/to/llvm-project
$ cd /path/to/lldb-dev-deps
$ cmake -GNinja -C/path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi" /path/to/llvm-project/llvm
$ cd /path/to/lldb-dev-xcode
$ cmake -GXcode -C/path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake -DLLDB_BUILD_FRAMEWORK=Off -DLLVM_DIR=/path/to/lldb-dev-deps/lib/cmake/llvm -DClang_DIR=/path/to/lldb-dev-deps/lib/cmake/clang /path/to/llvm-project/lldb
$ xcodebuild -configuration Debug -target check-lldb
$ xcodebuild -configuration Debug -target lldb-dotest