Right now the LIT args that are used for running libunwind, libc++abi and libc++ tests are taken from the LLVM_LIT_ARGS variable. Furthermore, every test target in the LLVM project, be it LLVM, clang, lld or libc++, use that variable for running LIT.
This is suboptimal if we're building such projects simultaneously as one toolchain: for example, if we're leveraging the llvm/runtimes directory for building a toolchain in one go (like we do in builders llvm-clang-win-x-armv7l and llvm-clang-win-x-aarch64) we can't tell the clang LIT target to run 8 parallel jobs and the libc++ LIT target to run 64 parallel jobs.
This patch introduces three new CMake variables: LIBUNWIND_LIT_ARGS, LIBCXXABI_LIT_ARGS and LIBCXX_LIT_AGRS. If they are defined, we use them to configure LIT targets and don't look at LLVM_LIT_ARGS. If they are not defined, we fall back to LLVM_LIT_ARGS.
(I wonder if setting a global variable is a good solution, but I've looked at the llvm/cmake/modules/AddLLVM.cmake file, where the add_lit_target function is defined, and it doesn't seem easy to change the behavior to pass the string containing LIT args as an argument to the add_lit_target function. Mainly because some downstream projects (at least Swift) depend on that function.)