A little while back we boot the standalone CMake build because it was broken, overly-complex and we found that nobody was really using it. I'd like to bring it back because it makes working with the sanitizers especially fast and easy. Some sanitizers, such as ASan, don't require dependencies to be instrumented. By leaving the LLVM libraries uninstrumented and optimized, we can build just lld with instrumentation and debug symbols, and get a blazing fast sanitizer build.
This patch reintroduces the standalone build in a cleaner way than before. The code to support the standalone build is itself standalone, nicely tucked under one conditional. It's purpose is to put the build into the same context as if the LLVM build included it. This patch also adds a config file for the one #define lld depends on, so that we don't have to reach into LLVM's private build directory for its config.h.
Does other projects too have a standalone build, I thought it was completely removed. If this is being revived should this be done for all projects ?
Please wait for Bigcheese / Nick whether we want to bring this in.