These are a collection of small fixes to make LLVM/Clang build with a clang+mingw toolchain to target Windows.
The three commits address the following problems:
- When using LTO we pass --lto-cache-directory to lld - but this option is not supported by the lld MingW driver so it fails with unknown argument.
- Don't symlink the tools - a MingW build version of clang should be assumed to be used on Windows - which doesn't support symlinks correctly - so instead use the copy path of the code for MingW as well.
- The logic for linking libclang with libdl was a bit flawed - use the similar logic as to other places in the CMake build system.